I have no troubles building MyGUI 3.2.0 on Fedora 16, which uses GCC 4.6.1. However, I'm trying to do some test builds on Fedora 17 (to prepare for packaging for that platform for 0.15.0+), which has GCC 4.7.0, and it fails. Here's the last bit of the output from the compilation:
Code: Select all
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::LayoutManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::LayoutManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::Gui>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::Gui>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::Gui>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::Gui>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/EditorWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::WidgetManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::WidgetManager>::msInstance'
CMakeFiles/Demo_Gui.dir/EditorWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::WidgetManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::WidgetManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/InformationWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::InputManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::InputManager>::msInstance'
CMakeFiles/Demo_Gui.dir/InformationWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::InputManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::InputManager>::mClassTypeName'
../../lib64/libMyGUI.OgrePlatform.so: undefined reference to `MyGUI::Singleton<MyGUI::DataManager>::msInstance'
../../lib64/libMyGUI.OgrePlatform.so: undefined reference to `MyGUI::Singleton<MyGUI::DataManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::LayerManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::RenderManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::PointerManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::RenderManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::LayerManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::PointerManager>::mClassTypeName'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/Demo_Gui] Error 1
make[2]: Leaving directory `/home/makerpm/rpmbuild/BUILD/mygui-3.2.0'
make[1]: *** [Demos/Demo_Gui/CMakeFiles/Demo_Gui.dir/all] Error 2
make[1]: Leaving directory `/home/makerpm/rpmbuild/BUILD/mygui-3.2.0'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.UA0cEO (%build)
What it looks like to me is some incompatibility between the newer GCC and MyGUI. Since it does build on the slightly older version of GCC, does anyone know of a way that I can work around this? Maybe some modification to the make instruction? As in, some flag I could use?