Building on Mac working?

tp

04-04-2011 10:30:30

I'm trying to port a project of mine to the Mac, using MyGUI. I do not have much earlier experience with Mac development, and I'm having problems building MyGUI using Xcode.

I managed to tweak the CMake settings according to some posts I found on this forum, but I was ultimately stuck on the singleton problem reported here:

viewtopic.php?f=17&t=13312

Unfortunately my expertise with Macs runs short here. Is there a confirmed way of building the library for use on a Mac?

Altren

04-04-2011 12:40:23

I'm not sure, but as far as I understand it depends on gcc version that you use. In all cases Static version of library compiles and works fine, but dynamic version fails to compile with some gcc versions.
Open MyGUI_Singleton.h and replace next lines:
#if MYGUI_COMPILER == MYGUI_COMPILER_MSVC || MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
template <class T>
class Singleton
#else
template <class T>
class MYGUI_EXPORT Singleton
#endif
with
#if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
template <class T>
class Singleton
#else
template <class T>
class MYGUI_EXPORT Singleton
#endif


If this helps please tell me what version of gcc do you have.

tp

05-04-2011 06:48:11

Here is what I am doing:

Set OGRE_SOURCE and OGRE_BUILD
Point MYGUI_DEPENDENCIES_DIR to Ogre's dependencies
Manually set OGRE_FOUND to TRUE
Set OGRE_LIBRARY from OGRE_LIBRARY-NOTFOUND to empty

Configure works, generate Xcode project

Try to build MyGUIEngine (Release): OK
Try to build Common (Release): Can't find OgreBuildSettings.h
Try to build MyGUI.OgrePlatform (Release): Can't find OgreBuildSettings.h

The path to OgreBuildSettings.h is correct in OGRE_CONFIG_INCLUDE_DIR, but apparently it is not used.
Add the value in OGRE_CONFIG_INCLUDE_DIR to OGRE_INCLUDE DIR (Must use ; as separator, space isn't working here)
Configure, generate

Try to build MyGUIEngine (Release): OK
Try to build Common (Release): 1513 errors about boost not found

Boost isn't detected, and since I don't have a separate boost installation, I can't set BOOST_ROOT.
I used macports to install boost, and it is in /opt/local, so added /opt/local/include to OGRE_INCLUDE_DIR.
Configure, generate

Try to build MyGUIEngine (Release): OK
Try to build Common (Release): OK
Try to build MyGUI.OgrePlatform (Release): OK
Try to build Demo_Gui (Release): 96 errors about undefined Ogre symbols

I tried some stuff with OGRE_LIBRARY and OGRE_LIB_DIR to no avail. Finally managed to move forward by adding OGRE_BUILD/lib/Release/Ogre.framework/Ogre to linker flags by hand in Xcode "Other Linker Flags". The CMake scripts seem to be unable to cope with the fact that Ogre is a mac framework.

Try to build Demo_Gui (Release): 32 errors about MyGUI singletons:

Undefined symbols:
"MyGUI::Singleton<MyGUI::InputManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in libCommon.a(BaseManager.o)
"MyGUI::Singleton<MyGUI::DataManager>::msInstance", referenced from:
MyGUI::OgreRenderManager::createTexture(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::getInstance() in libMyGUI.OgrePlatform.a(MyGUI_OgreTexture.o)
"MyGUI::Singleton<MyGUI::Gui>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::Singleton<MyGUI::Gui>::getInstance() in libCommon.a(BaseManager.o)
"_OBJC_CLASS_$_NSApplication", referenced from:
objc-class-ref-to-NSApplication in libOIS.a(CocoaInputManager.o)
"MyGUI::Singleton<MyGUI::LayoutManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in DemoKeeper.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in MainPanel.o
"MyGUI::Singleton<MyGUI::LayoutManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in DemoKeeper.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in DemoKeeper.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::LayoutManager>::getInstance() in MainPanel.o
"__objc_empty_cache", referenced from:
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"MyGUI::Singleton<MyGUI::PointerManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::PointerManager>::getInstance() in libCommon.a(PointerManager.o)
"MyGUI::Singleton<MyGUI::WidgetManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::WidgetManager>::getInstance() in EditorWindow.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref-to-NSAutoreleasePool in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSWindow", referenced from:
objc-class-ref-to-NSWindow in libOIS.a(OISInputManager.o)
"MyGUI::Singleton<MyGUI::SkinManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in libCommon.a(BaseManager.o)
"MyGUI::Singleton<MyGUI::Gui>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::Gui>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::OgreRenderManager::renderQueueStarted(unsigned char, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&)in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
"_objc_msgSend_stret_fixup", referenced from:
l_objc_msgSend_stret_fixup_frame in libOIS.a(CocoaMouse.o)
(maybe you meant: l_objc_msgSend_stret_fixup_frame)
"_OBJC_CLASS_$_NSTrackingArea", referenced from:
objc-class-ref-to-NSTrackingArea in libOIS.a(CocoaMouse.o)
"MyGUI::Singleton<MyGUI::SkinManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowBox.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in ColourWindowCellView.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in MainPanel.o
MyGUI::Singleton<MyGUI::SkinManager>::getInstance() in libCommon.a(BaseManager.o)
"_OBJC_CLASS_$_NSResponder", referenced from:
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"__objc_empty_vtable", referenced from:
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"_OBJC_METACLASS_$_NSView", referenced from:
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"MyGUI::Singleton<MyGUI::WidgetManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::WidgetManager>::getInstance() in EditorWindow.o
MyGUI::Singleton<MyGUI::WidgetManager>::getInstance() in EditorWindow.o
"_OBJC_CLASS_$_NSView", referenced from:
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSNumber", referenced from:
objc-class-ref-to-NSNumber in libOIS.a(CocoaMouse.o)
"MyGUI::Singleton<MyGUI::LayerManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::LayerManager>::getInstance() in libCommon.a(BaseManager.o)
"MyGUI::Singleton<MyGUI::DataManager>::mClassTypeName", referenced from:
MyGUI::OgreDataManager::initialise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::initialise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::initialise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::initialise(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::OgreDataManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreDataManager.o)
MyGUI::Singleton<MyGUI::DataManager>::getInstance() in libMyGUI.OgrePlatform.a(MyGUI_OgreTexture.o)
"MyGUI::Singleton<MyGUI::LayerManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::LayerManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::Singleton<MyGUI::LayerManager>::getInstance() in libCommon.a(BaseManager.o)
"_OBJC_METACLASS_$_NSResponder", referenced from:
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"_objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_class in libOIS.a(OISInputManager.o)
l_objc_msgSend_fixup_isKindOfClass_ in libOIS.a(OISInputManager.o)
l_objc_msgSend_fixup_sharedApplication in libOIS.a(CocoaInputManager.o)
l_objc_msgSend_fixup_keyWindow in libOIS.a(CocoaInputManager.o)
l_objc_msgSend_fixup_alloc in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_init in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_contentView in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_initWithFrame_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_addSubview_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_setOISMouseObj_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_drain in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_release in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_capture in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_window in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_numberWithInt_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_dictionaryWithObjectsAndKeys_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_initWithRect_options_owner_userInfo_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_addTrackingArea_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_setAcceptsMouseMovedEvents_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_type in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_modifierFlags in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_deltaX in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_deltaY in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_mouseLocationOutsideOfEventStream in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_alloc in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_init in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_makeFirstResponder_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_setUseRepeat_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_setOISKeyboardObj_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_release in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_isKeyDown_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_capture in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_copyKeyStates_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_populateKeyConversion in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_injectEvent_eventTime_eventType_eventText_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_keyCode in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_timestamp in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_charactersIgnoringModifiers in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_length in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_getCharacters_range_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_characterAtIndex_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_injectEvent_eventTime_eventType_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_modifierFlags in libOIS.a(CocoaKeyboard.o)
(maybe you meant: l_objc_msgSend_fixup_release, l_objc_msgSend_fixup_setAcceptsMouseMovedEvents_ , l_objc_msgSend_fixup_charactersIgnoringModifiers , l_objc_msgSend_fixup_alloc , l_objc_msgSend_fixup_getCharacters_range_ , l_objc_msgSend_fixup_isKindOfClass_ , l_objc_msgSend_fixup_isKeyDown_ , l_objc_msgSend_fixup_injectEvent_eventTime_eventType_eventText_ , l_objc_msgSend_fixup_contentView , l_objc_msgSend_fixup_deltaX , l_objc_msgSend_fixup_deltaY , l_objc_msgSend_fixup_mouseLocationOutsideOfEventStream , l_objc_msgSend_fixup_numberWithInt_ , l_objc_msgSend_fixup_addSubview_ , l_objc_msgSend_fixup_window , l_objc_msgSend_fixup_sharedApplication , l_objc_msgSend_fixup_length , l_objc_msgSend_fixup_type , l_objc_msgSend_fixup_capture , l_objc_msgSend_fixup_modifierFlags , l_objc_msgSend_fixup_timestamp , l_objc_msgSend_fixup_class , l_objc_msgSend_fixup_addTrackingArea_ , l_objc_msgSend_fixup_dictionaryWithObjectsAndKeys_ , l_objc_msgSend_fixup_keyWindow , l_objc_msgSend_fixup_characterAtIndex_ , l_objc_msgSend_fixup_copyKeyStates_ , l_objc_msgSend_fixup_initWithFrame_ , l_objc_msgSend_fixup_makeFirstResponder_ , l_objc_msgSend_fixup_injectEvent_eventTime_eventType_ , l_objc_msgSend_fixup_setOISKeyboardObj_ , l_objc_msgSend_fixup_initWithRect_options_owner_userInfo_ , l_objc_msgSend_fixup_setUseRepeat_ , l_objc_msgSend_fixup_setOISMouseObj_ , l_objc_msgSend_fixup_keyCode , l_objc_msgSend_fixup_init , l_objc_msgSend_fixup_drain , l_objc_msgSend_fixup_populateKeyConversion )
"_objc_msgSendSuper2_fixup", referenced from:
l_objc_msgSendSuper2_fixup_initWithFrame_ in libOIS.a(CocoaMouse.o)
l_objc_msgSendSuper2_fixup_init in libOIS.a(CocoaKeyboard.o)
(maybe you meant: l_objc_msgSendSuper2_fixup_initWithFrame_, l_objc_msgSendSuper2_fixup_init )
"MyGUI::Singleton<MyGUI::PointerManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::PointerManager>::getInstance() in libCommon.a(PointerManager.o)
MyGUI::Singleton<MyGUI::PointerManager>::getInstance() in libCommon.a(PointerManager.o)
"MyGUI::Singleton<MyGUI::RenderManager>::mClassTypeName", referenced from:
MyGUI::Singleton<MyGUI::RenderManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*) in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*) in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*) in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*) in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::shutdown() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
"MyGUI::Singleton<MyGUI::InputManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in InformationWindow.o
MyGUI::Singleton<MyGUI::InputManager>::getInstance() in libCommon.a(BaseManager.o)
"MyGUI::Singleton<MyGUI::RenderManager>::msInstance", referenced from:
MyGUI::Singleton<MyGUI::RenderManager>::getInstance() in libCommon.a(BaseManager.o)
MyGUI::OgreRenderManager::getInstancePtr() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::OgreRenderManager::getInstance() in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)
MyGUI::Singleton<MyGUI::RenderManager>::~Singleton()in libMyGUI.OgrePlatform.a(MyGUI_OgreRenderManager.o)


I'm using GCC 4.2. For the time being, I don't know how to switch GCC versions or how to link statically on mac, so I can't test those. Any help is appreciated and please let me know if there's any other information I can give.

Altren

05-04-2011 08:28:45

Well, everything was configured properly, including OGRE, and problem is in MyGUI sources. You should try to modify MyGUI_Singleton.h as I suggested above, just change one line. Try that first.
If this won't help build MyGUI as static library. To do that enable MYGUI_STATIC option in CMake, configure again and build.

tp

13-04-2011 06:36:55

I reverted to the boost installation provided by the Ogre mac dependency package, and got Ogre samples working and switched MyGUI to link statically. I'm now at 14 errors at the linking phase.

These seem to be OIS specific, but are probably somehow related to the MyGUI project. I am using the OIS library from Ogre dependencies. Any help would be appreciated once again.

Undefined symbols:
"_objc_msgSend_stret_fixup", referenced from:
l_objc_msgSend_stret_fixup_frame in libOIS.a(CocoaMouse.o)
(maybe you meant: l_objc_msgSend_stret_fixup_frame)
"__objc_empty_vtable", referenced from:
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"__objc_empty_cache", referenced from:
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSApplication", referenced from:
objc-class-ref-to-NSApplication in libOIS.a(CocoaInputManager.o)
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref-to-NSAutoreleasePool in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSNumber", referenced from:
objc-class-ref-to-NSNumber in libOIS.a(CocoaMouse.o)
"_objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_class in libOIS.a(OISInputManager.o)
l_objc_msgSend_fixup_isKindOfClass_ in libOIS.a(OISInputManager.o)
l_objc_msgSend_fixup_sharedApplication in libOIS.a(CocoaInputManager.o)
l_objc_msgSend_fixup_keyWindow in libOIS.a(CocoaInputManager.o)
l_objc_msgSend_fixup_alloc in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_init in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_makeFirstResponder_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_setUseRepeat_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_setOISKeyboardObj_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_release in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_isKeyDown_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_capture in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_copyKeyStates_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_populateKeyConversion in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_injectEvent_eventTime_eventType_eventText_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_keyCode in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_timestamp in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_charactersIgnoringModifiers in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_length in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_getCharacters_range_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_characterAtIndex_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_injectEvent_eventTime_eventType_ in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_modifierFlags in libOIS.a(CocoaKeyboard.o)
l_objc_msgSend_fixup_alloc in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_init in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_contentView in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_initWithFrame_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_addSubview_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_setOISMouseObj_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_drain in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_release in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_capture in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_window in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_numberWithInt_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_dictionaryWithObjectsAndKeys_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_initWithRect_options_owner_userInfo_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_addTrackingArea_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_setAcceptsMouseMovedEvents_ in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_type in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_modifierFlags in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_deltaX in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_deltaY in libOIS.a(CocoaMouse.o)
l_objc_msgSend_fixup_mouseLocationOutsideOfEventStream in libOIS.a(CocoaMouse.o)
(maybe you meant: l_objc_msgSend_fixup_init, l_objc_msgSend_fixup_setAcceptsMouseMovedEvents_ , l_objc_msgSend_fixup_type , l_objc_msgSend_fixup_getCharacters_range_ , l_objc_msgSend_fixup_numberWithInt_ , l_objc_msgSend_fixup_deltaX , l_objc_msgSend_fixup_deltaY , l_objc_msgSend_fixup_timestamp , l_objc_msgSend_fixup_window , l_objc_msgSend_fixup_length , l_objc_msgSend_fixup_sharedApplication , l_objc_msgSend_fixup_makeFirstResponder_ , l_objc_msgSend_fixup_initWithRect_options_owner_userInfo_ , l_objc_msgSend_fixup_contentView , l_objc_msgSend_fixup_characterAtIndex_ , l_objc_msgSend_fixup_setOISMouseObj_ , l_objc_msgSend_fixup_isKindOfClass_ , l_objc_msgSend_fixup_release , l_objc_msgSend_fixup_populateKeyConversion , l_objc_msgSend_fixup_isKeyDown_ , l_objc_msgSend_fixup_setUseRepeat_ , l_objc_msgSend_fixup_mouseLocationOutsideOfEventStream , l_objc_msgSend_fixup_copyKeyStates_ , l_objc_msgSend_fixup_setOISKeyboardObj_ , l_objc_msgSend_fixup_dictionaryWithObjectsAndKeys_ , l_objc_msgSend_fixup_initWithFrame_ , l_objc_msgSend_fixup_alloc , l_objc_msgSend_fixup_charactersIgnoringModifiers , l_objc_msgSend_fixup_injectEvent_eventTime_eventType_ , l_objc_msgSend_fixup_addSubview_ , l_objc_msgSend_fixup_class , l_objc_msgSend_fixup_capture , l_objc_msgSend_fixup_modifierFlags , l_objc_msgSend_fixup_keyWindow , l_objc_msgSend_fixup_addTrackingArea_ , l_objc_msgSend_fixup_drain , l_objc_msgSend_fixup_keyCode , l_objc_msgSend_fixup_injectEvent_eventTime_eventType_eventText_ )
"_objc_msgSendSuper2_fixup", referenced from:
l_objc_msgSendSuper2_fixup_init in libOIS.a(CocoaKeyboard.o)
l_objc_msgSendSuper2_fixup_initWithFrame_ in libOIS.a(CocoaMouse.o)
(maybe you meant: l_objc_msgSendSuper2_fixup_init, l_objc_msgSendSuper2_fixup_initWithFrame_ )
"_OBJC_METACLASS_$_NSResponder", referenced from:
_OBJC_METACLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"_OBJC_CLASS_$_NSView", referenced from:
_OBJC_CLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSResponder", referenced from:
_OBJC_CLASS_$_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
"_OBJC_METACLASS_$_NSView", referenced from:
_OBJC_METACLASS_$_CocoaMouseView in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSTrackingArea", referenced from:
objc-class-ref-to-NSTrackingArea in libOIS.a(CocoaMouse.o)
"_OBJC_CLASS_$_NSWindow", referenced from:
objc-class-ref-to-NSWindow in libOIS.a(OISInputManager.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Arcnor

23-04-2011 13:56:55

Don't know if you still have this problem, but have you tried adding "-framework Cocoa -framework Carbon -framework IOKit" to the linking phase? All the undefined symbols you're getting are from Cocoa, and the other two libs are also required for some things OGRE & OIS related, but maybe not needed here.

[EDIT]: I've just compiled MyGUI and I can confirm that only Cocoa framework is needed.

Altren

24-04-2011 01:40:06

Could you tell me how you compiled it? Did you used static or dynamic build? I'm asking because some users have problems with building non-static version while other say that it compiles fine. And most of them are not helping to figure what's wrong.

Arcnor

24-04-2011 10:53:35

Sorry for the late reply (Didn't know how to subscribe a topic :P)

I had to build it statically. When compiling dynamic, although MyGUIEngine compiled, linking it with the demos produced the same error as http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=13312#p74613, more or less like the one posted in this same thread.

Removing the APPLE part from the ifdef, as you said in this thread, didn't work.

I was using the LLVM GCC 4.2 compiler and didn't try with the GCC 4.2, but I can try if you think it will be different. Also, if you have any other question or want me to try anything, I'll be happy to help :)