Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: InputManager::createInputSystem linker error XCode Mac  (Read 1320 times)

graffiti

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 1
    • View Profile
InputManager::createInputSystem linker error XCode Mac
« on: June 13, 2008, 02:04:39 PM »

Hey there,

Getting a linker error that I just cannot fathom, code builds fine on windows but on Mac (XCode3) the code:

Code: [Select]
OIS::ParamList pl;
[...snip...]
mInputManager = OIS::InputManager::createInputSystem(pl);

compiles ok, but gives a linker error:
Quote
Undefined symbols: "OIS::InputManager::createInputSystem(__gnu_debug_def::multimap<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)"

The libois.a is in the project and is found by the linker. I've tried rebuilding libois.a from source. I've tried building debug and release versions of libois.a. I've tried building the library as an OSX framework and linking with that. I've tried using the dylib libois!

The function definition in libois looks fine, I really don't understand why this error is occuring?!?!

Any help would be greatly appreciated!

Thanks, graf.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: InputManager::createInputSystem linker error XCode Mac
« Reply #1 on: June 17, 2008, 08:11:46 AM »

Haven't seen that error on OSX. What version of OIS are you using? Does the console demo build/run? Might be something to do with visibility settings. I think I have turned on hide symbols not marked as exported.. You can try turning off that project setting and rebuilding.
Logged

damiannz

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 1
    • View Profile
Re: InputManager::createInputSystem linker error XCode Mac
« Reply #2 on: June 23, 2010, 12:15:47 AM »

hi,

i know this is ooold but i was having this error and this link is number 1 on google at the moment..

anyway:
this seems to be something to do with a couple of flags that Xcode sets for new Debug projects. the key here is that your app is looking for __gnu_debug_def::multimap whereas in the OIS lib it's simply std::multimap.

to fix: in your app's xcode project, find the active target on the left panel (expand the 'Targets' item), Cmd-I to get info, set the configuration to Debug, search for Preprocessor Macros, delete the options '_GLIBCXX_DEBUG=1' and '_GLIBCXX_DEBUG_PEDANTIC=1'. solution found here: http://forums.macrumors.com/showthread.php?t=700809
Logged