Open
Description
I just tried to build openage with clang 18 and there is an error in the linker stage with nyan.
[ 0%] Linking CXX shared library libopenage.so
/media/christoph/LinuxDat/Git-Repositories/openage-testing/libopenage/main/demo/pong/gamestate.cpp:124: Fehler: undefined reference to '_ZNK4nyan6Object3getITkNS_9ValueLikeES0_EESt10shared_ptrIT_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libopenage/CMakeFiles/libopenage.dir/build.make:6192: libopenage/libopenage.so.0] Fehler 1
make[2]: *** [CMakeFiles/Makefile2:3703: libopenage/CMakeFiles/libopenage.dir/all] Fehler 2
make[1]: *** [Makefile:166: all] Fehler 2
make: *** [Makefile:36: build] Fehler 2
The culprit is this line of code:
this->ballcfg = *gamecfg.get<nyan::Object>("ball");
The function it can't reference is
Lines 375 to 380 in e09e965
Changing the code in openage to
this->ballcfg = gamecfg.get_object("ball");
solves the problem, so the problem is the template function sigature.
Note that I did not build nyan with clang, but that was never a problem before and I assume it's unrelated.