[Solved][iOS] Link error using Xcode 5 and ogre 1.8.2

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
shakyburger
Gnoblar
Posts: 2
Joined: Sat Oct 19, 2013 8:35 am

[Solved][iOS] Link error using Xcode 5 and ogre 1.8.2

Post by shakyburger » Sat Oct 19, 2013 2:40 pm

Hello,

I'm new in Ogre3D iPhone and Xcode, so please excuse me if I missing some very basic setting or steps.

I got 134 link errors when try to start a ogre project by ogre template (follow this tutorial http://www.ogre3d.org/tikiwiki/tiki-ind ... IphoneFast).
The ogre is 1.8.2 pre-build and with dependency and template download (from http://sourceforge.net/projects/ogre/fi ... ncies-mac/).
The project was create by template on Xcode 5.
And I add user-defined setting "OGRE_SDK_ROOT" to sdk root folder in project so compile success.
But looks the link error tells me cannot link to library.

Here are part of the link errors,

Code: Select all

Undefined symbols for architecture i386:
  "OIS::InputManager::createInputObject(OIS::Type, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "OIS::InputManager::createInputSystem(std::__1::multimap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >&)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "Ogre::ConfigFile::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "Ogre::LogManager::createLog(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, bool)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "Ogre::StringUtil::startsWith(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "Ogre::OverlayManager::createOverlayElement(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      OgreBites::SdkTrayManager::SdkTrayManager(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::RenderWindow*, OIS::MultiTouch*, OgreBites::SdkTrayListener*) in OgreFramework.o
  "Ogre::OverlayManager::createOverlayElementFromTemplate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      OgreBites::DecorWidget::DecorWidget(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreFramework.o
      OgreBites::ParamsPanel::ParamsPanel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, float, unsigned int) in OgreFramework.o
      OgreBites::Label::Label(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::UTFString const&, float) in OgreFramework.o
      OgreBites::SdkTrayManager::SdkTrayManager(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::RenderWindow*, OIS::MultiTouch*, OgreBites::SdkTrayListener*) in OgreFramework.o
  "Ogre::OverlayManager::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      OgreBites::SdkTrayManager::SdkTrayManager(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::RenderWindow*, OIS::MultiTouch*, OgreBites::SdkTrayListener*) in OgreFramework.o
  "Ogre::StringConverter::toString(int, unsigned short, char, unsigned int)", referenced from:
      OgreBites::SdkTrayManager::frameRenderingQueued(Ogre::FrameEvent const&) in OgreFramework.o
  "Ogre::StringConverter::toString(unsigned long, unsigned short, char, unsigned int)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
      OgreBites::SdkTrayManager::frameRenderingQueued(Ogre::FrameEvent const&) in OgreFramework.o
  "Ogre::ResourceGroupManager::addResourceLocation(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
      OgreFramework::initOgre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, OIS::KeyListener*, OIS::MultiTouchListener*) in OgreFramework.o
  "Ogre::ResourceGroupManager::getResourceLocationList(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      DemoApp::initializeRTShaderSystem(Ogre::SceneManager*) in OgreDemoApp.o
  "Ogre::Log::logMessage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Ogre::LogMessageLevel, bool)", referenced from:
      DemoApp::startDemo() in OgreDemoApp.o
      DemoApp::runDemo() in OgreDemoApp.o
My questions are,
1. I notice some of article said I have to build for device, instead of simulator. Is it the reason I got these errors?
2. Is there any library or step I miss, so I got these link errors?
3. I also tried ogre 1.9 rc but there is no template for 1.9. Is there 1.9 template version or 1.8 template would be compatible?

Any help would be appreciated, thanks in advance.
Last edited by shakyburger on Tue Nov 26, 2013 4:24 pm, edited 1 time in total.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: [iOS] Link error using Xcode 5 and ogre 1.8.2

Post by masterfalcon » Sun Oct 20, 2013 6:18 am

My first guess is that the template is defaulting to using C++11 and libc++, the 1.8 binaries are not built against libc++ and are not compatible with it. You can change this in the Build Settings in Xcode.
0 x

shakyburger
Gnoblar
Posts: 2
Joined: Sat Oct 19, 2013 8:35 am

Re: [iOS] Link error using Xcode 5 and ogre 1.8.2

Post by shakyburger » Sun Oct 20, 2013 2:14 pm

Hi masterfalcon,

Yes it is! After change C++ Standard Library from compiler default to "libstdc++ (GNU C++ standard library)" linker works good.
Change deployment target to iOS 6.1 also works.

Many thanks for your help.
0 x

Post Reply