Page 1 of 1

[Solved] Problem linking CEGUISampleFramework (boost/OGRE)

Posted: Thu Jan 17, 2013 08:49
by pav
I'm getting the following error when building from Mercurial.

Code: Select all

[ 67%] Linking CXX executable ../bin/CEGUISampleFramework
/usr/bin/ld: CMakeFiles/CEGUISampleFramework.dir/src/SamplesFrameworkBase.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/bin/ld: note: '_ZN5boost6system15system_categoryEv' is defined in DSO /usr/lib/libboost_system.so.1.50.0 so try adding it to the linker command line
/usr/lib/libboost_system.so.1.50.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/CEGUISampleFramework] Error 1
make[1]: *** [samples_framework/CMakeFiles/CEGUISampleFramework.dir/all] Error 2

I'm using Archlinux. Here's two relevant topics: OGRE forums, Arch forums.
Question: Is this a problem with boost, OGRE, CEGUI or Archlinux? (yes, I'm a noob)

Re: Problem linking CEGUISampleFramework (boost/OGRE)

Posted: Thu Jan 17, 2013 09:57
by Kulik
This is a change in boost that they made in 1.50 release AFAIK. You have to link to boost_system now.

There is a more elaborate thread about this on the Ogre forums and elsewhere if you are interested in the "why" :-)

Re: Problem linking CEGUISampleFramework (boost/OGRE)

Posted: Thu Jan 17, 2013 10:17
by pav
Kulik wrote:This is a change in boost that they made in 1.50 release AFAIK. You have to link to boost_system now.

So it's CEGUI's build script that has to be updated, right? Or Ogre's? :? (aka "How to fix without studying for 2 days and nights")

Re: Problem linking CEGUISampleFramework (boost/OGRE)

Posted: Thu Jan 17, 2013 12:30
by Kulik
CEGUI Ogre Renderer has to link to boost_system in this instance, so CEGUI's. However we refuse to introduce these hacks in our build systems because it's not us making a mistake :-) We will have to figure out some clean solution. For the moment you can just adjust the flags to link to boost_system.

EDIT: Not CEGUIBase, CEGUIOgreRenderer!

Re: Problem linking CEGUISampleFramework (boost/OGRE)

Posted: Tue Jan 22, 2013 11:26
by pav
Thanks, I had to change the last line of "samples_framework/CMakeLists.txt" from:

Code: Select all

cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME})


to

Code: Select all

cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_BASE_LIBNAME} boost_system)