Can't build Demos and Tools on MinGW in relwithdebinfo

Ausir

26-09-2012 15:56:58

Hi!
I'm succesfully building libMyGUIEngine.dll and libMyGUI.OgrePlatform (against a very recent revision of Ogre 1.9, compiled in relwithdebinfo mode), but when building I get this:
D:\DevelopmentC++\MYGUI_BUILD>mingw32-make -j8 install
[ 28%] Built target MyGUIEngine
[ 29%] Built target Plugin_StrangeButton
[ 31%] Built target MyGUI.OgrePlatform
[ 31%] Built target Common
Linking CXX shared library ..\..\bin\libEditorFramework.dll
Creating library file: ..\..\lib\libEditorFramework.dll.a
CMakeFiles\EditorFramework.dir/objects.a(MyGUI_FilterNoneSkin.cpp.obj): In funct
ion `thread_exception':
D:/DevelopmentC++/boost_1_50_0/boost/thread/exceptions.hpp:49: undefined referen
ce to `boost::system::system_category()'

and following errors all related to boost::system.
Notably, to make the compilation work using Ogre relwithdebinfo, I left a lot of OGRE_*_DBG CMake entries set to NOT_FOUND.
Boost was built under 'D:\DevelopmentC++\boost_1_50_0' , where i got the 'stage' folder.
Relevant boost CMake (I'm using version 2.8.3) variables are (taken from CMakeCache.txt):
//Path to Boost (required if Ogre was built with boost)
BOOST_ROOT:PATH=D:/DevelopmentC++/boost_1_50_0

//Path to a file.
Boost_INCLUDE_DIR:PATH=D:/DevelopmentC++/boost_1_50_0

//Boost library directory
Boost_LIBRARY_DIRS:FILEPATH=D:/DevelopmentC++/boost_1_50_0/stage/lib

//Boost diagnostic define
Boost_LIB_DIAGNOSTIC_DEFINITIONS:STRING=-DBOOST_LIB_DIAGNOSTIC

########################
# INTERNAL cache entries
########################

//ADVANCED property for variable: Boost_INCLUDE_DIR
Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LIBRARY_DIRS
Boost_LIBRARY_DIRS-ADVANCED:INTERNAL=1
//The library version string for boost libraries
Boost_LIB_VERSION:INTERNAL=1_50
//The version number for boost libraries
Boost_VERSION:INTERNAL=105000


I know it's a CMake question, but how can I get the demos and editor to build (as of now, I'm succesfully using the editor from the binary download)?

Altren

26-09-2012 16:43:06

If Ogre was built with boost set BOOST_ROOT option manually in CMake.

Ausir

30-09-2012 12:48:35

BOOST_ROOT is already correctly set; upon messing around with CMake files, I managed to build libEditorFramework.a by adding explicitly
link_directories(D:/DevelopmentC++/boost_1_50_0/stage/lib)
target_link_libraries(${PROJECTNAME} D:/DevelopmentC++/boost_1_50_0/stage/lib/libboost_system-mgw47-mt-1_50.dll)

after linking to libMyGUIEngine in Utils/MyGUIConfigTargets.cmake .
With this change, libEditorFramework is built, but the 4 *Editor.exe fail to link (errors on specialized Singleton templates).
If I however build the Demos, they get correctly linked and built.