#519 GG compilation error (undefined reference to `GG::SDLGUi...)

Latest Subversion
closed-fixed
nobody
None
5
2014-08-25
2012-09-12
flavien
No

I obtain a compilation error, after the following command on debian sid :

#> svn co https://freeorion.svn.sourceforge.net/svnroot/freeorion freeorion
...
#> cmake -DBUILD_TUTORIALS=off -DBUILD_OGRE_DRIVER=ON -DBUILD_OGRE_OIS_PLUGIN=ON
#> make
...
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o: In function `MinimalGGApp::MinimalGGApp()':
TestEveLayout.cpp:(.text+0xbb2): undefined reference to `GG::SDLGUI::SDLGUI(int, int, bool, std::string const&)'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o: In function `eve_layout::test_method()':
TestEveLayout.cpp:(.text+0x1465): undefined reference to `GG::SDLGUI::operator()()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x20): undefined reference to `GG::SDLGUI::Ticks() const'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x28): undefined reference to `GG::SDLGUI::AppWidth() const'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x30): undefined reference to `GG::SDLGUI::AppHeight() const'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x40): undefined reference to `GG::SDLGUI::Exit(int)'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x48): undefined reference to `GG::SDLGUI::HandleSystemEvents()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x70): undefined reference to `GG::SDLGUI::RenderBegin()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x80): undefined reference to `GG::SDLGUI::RenderEnd()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x88): undefined reference to `GG::SDLGUI::Run()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0x90): undefined reference to `GG::SDLGUI::SDLInit()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0xa8): undefined reference to `GG::SDLGUI::HandleNonGGEvent(SDL_Event const&)'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTV12MinimalGGApp[_ZTV12MinimalGGApp]+0xb8): undefined reference to `GG::SDLGUI::SDLQuit()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o: In function `MinimalGGApp::~MinimalGGApp()':
TestEveLayout.cpp:(.text._ZN12MinimalGGAppD2Ev[_ZN12MinimalGGAppD5Ev]+0x1f): undefined reference to `GG::SDLGUI::~SDLGUI()'
CMakeFiles/EveLayout-test.dir/TestEveLayout.cpp.o:(.rodata._ZTI12MinimalGGApp[_ZTI12MinimalGGApp]+0x10): undefined reference to `typeinfo for GG::SDLGUI'
collect2: error: ld returned 1 exit status
make[2]: *** [EveLayout-test] Erreur 1
make[1]: *** [test/CMakeFiles/EveLayout-test.dir/all] Erreur 2
make: *** [all] Erreur 2

Discussion

  • Geoff Topping

    Geoff Topping - 2012-09-12

    FreeOrion doesn't need the GG tests to be built, so I've attached a completely untested patch to add an option in CMake to disable building the tests. Could you try it out?

     
  • Geoff Topping

    Geoff Topping - 2012-09-12

    patch to make GG test builds optional

     
  • Geoff Topping

    Geoff Topping - 2012-09-13
    • status: open --> closed-fixed
     
  • Geoff Topping

    Geoff Topping - 2012-09-13

    After consulting a Linux user, I've committed a tweaked version of the patch which adds an option about whether to build tests that defaults off, and doesn't appear at all if the SDL driver option is not marked true. Please comment again if this doesn't fix the issue for you.

     
  • flavien

    flavien - 2012-09-13

    It's OK, that fix the issue for me.
    Thanks.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks