[SOLVED] OSX, error: framework not found OGRE

Problems building or running the engine, queries about how to use features etc.
Post Reply
alberteddu
Gnoblar
Posts: 6
Joined: Sun Jan 10, 2010 12:53 am

[SOLVED] OSX, error: framework not found OGRE

Post by alberteddu » Wed May 04, 2011 11:00 am

Hi there,

OGRE really rocks. I finally managed to get it installed in my Mac OS X 10.6, and tried to create a new project using the tutorial http://www.ogre3d.org/tikiwiki/Setting+ ... +-+Mac+OSX.

Following those instructions, I created a MyProject.xcodeproj (Xcode 4) with the code of the tutorial application inside of it. But, when I try to build, I get:

ld: framework not found OGRE
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.2 failed with exit code 1

I feel like this is the simplest problem ever, but I looked for this in the wiki and in the forums, and did not find anything (this suggests me that I am the only idiot who can't solve this issue).

Thanks for your help.

—Alberteddu
Last edited by alberteddu on Wed May 04, 2011 11:48 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: OSX, error: framework not found OGRE

Post by masterfalcon » Wed May 04, 2011 2:38 pm

You should just have to add the path to where Ogre.framework is located to Framework Search Paths in your project.
0 x

alberteddu
Gnoblar
Posts: 6
Joined: Sun Jan 10, 2010 12:53 am

Re: OSX, error: framework not found OGRE

Post by alberteddu » Wed May 04, 2011 6:40 pm

masterfalcon wrote:You should just have to add the path to where Ogre.framework is located to Framework Search Paths in your project.
Hi and thanks for your reply. I installed the OGRE 1.7.2 SDK for Mac OS X by dragging the Folder to a directory, then I built all the samples. Where I can find the Ogre.framework?
Edit: Ok, I found it. I will let you know if it will work.
0 x

alberteddu
Gnoblar
Posts: 6
Joined: Sun Jan 10, 2010 12:53 am

Re: OSX, error: framework not found OGRE

Post by alberteddu » Wed May 04, 2011 6:55 pm

Now I'm getting:

Code: Select all

Undefined symbols for architecture i386:
  "_ActiveNonFloatingWindow", referenced from:
      OIS::MacInputManager::_parseConfigSettings(std::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> > > > >&)in libOIS.a(MacInputManager.o)
  "_GetApplicationEventTarget", referenced from:
      OIS::MacInputManager::_parseConfigSettings(std::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> > > > >&)in libOIS.a(MacInputManager.o)
  "_RemoveEventHandler", referenced from:
      OIS::MacKeyboard::_initialize()      in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::~MacKeyboard()in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::~MacKeyboard()in libOIS.a(MacKeyboard.o)
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
  "_InstallEventHandler", referenced from:
      OIS::MacKeyboard::_initialize()      in libOIS.a(MacKeyboard.o)
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
  "_GetEventParameter", referenced from:
      OIS::MacKeyboard::_modChangeCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::_keyUpCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::_keyDownCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
  "_GetEventTime", referenced from:
      OIS::MacKeyboard::_modChangeCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::_keyUpCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
      OIS::MacKeyboard::_keyDownCallback(OpaqueEventRef*)       in libOIS.a(MacKeyboard.o)
  "_CGAssociateMouseAndMouseCursorPosition", referenced from:
      OIS::MacMouse::WindowFocusChanged(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacMouse.o)
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      OIS::CocoaMouse::_initialize()      in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseExited:] in libOIS.a(CocoaMouse.o)
      ...
  "_CallNextEventHandler", referenced from:
      OIS::MacMouse::WindowFocusChanged(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacMouse.o)
      KeyUpWrapper(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacHelpers.o)
      KeyDownWrapper(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacHelpers.o)
      MouseWrapper(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacHelpers.o)
      KeyModWrapper(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libOIS.a(MacHelpers.o)
  "_CGMainDisplayID", referenced from:
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      -[CocoaMouseView mouseExited:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView initWithFrame:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseEntered:] in libOIS.a(CocoaMouse.o)
      ...
  "_CGDisplayHideCursor", referenced from:
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
      -[CocoaMouseView initWithFrame:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseEntered:] in libOIS.a(CocoaMouse.o)
  "_GetWindowBounds", referenced from:
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
  "_CGDisplayMoveCursorToPoint", referenced from:
      OIS::MacMouse::_initialize()     in libOIS.a(MacMouse.o)
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
      -[CocoaMouseView initWithFrame:] in libOIS.a(CocoaMouse.o)
  "_GetEventKind", referenced from:
      OIS::MacMouse::_mouseCallback(OpaqueEventRef*)      in libOIS.a(MacMouse.o)
  "_CGDisplayShowCursor", referenced from:
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      OIS::MacMouse::~MacMouse()in libOIS.a(MacMouse.o)
      -[CocoaMouseView mouseExited:] in libOIS.a(CocoaMouse.o)
      OIS::CocoaMouse::~CocoaMouse()in libOIS.a(CocoaMouse.o)
      OIS::CocoaMouse::~CocoaMouse()in libOIS.a(CocoaMouse.o)
  "_objc_msgSend", referenced from:
      OIS::InputManager::createInputSystem(std::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> > > > >&)in libOIS.a(OISInputManager.o)
      OIS::CocoaInputManager::_parseConfigSettings(std::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> > > > >&)in libOIS.a(CocoaInputManager.o)
      -[CocoaKeyboardView injectEvent:eventTime:eventType:] in libOIS.a(CocoaKeyboard.o)
      OIS::CocoaKeyboard::copyKeyStates(char*) constin libOIS.a(CocoaKeyboard.o)
      OIS::CocoaKeyboard::capture()     in libOIS.a(CocoaKeyboard.o)
      OIS::CocoaKeyboard::isKeyDown(OIS::KeyCode) constin libOIS.a(CocoaKeyboard.o)
      -[CocoaKeyboardView init] in libOIS.a(CocoaKeyboard.o)
      ...
  "_IOServiceMatching", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
  "_CFNumberCreate", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
  "_CFDictionarySetValue", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
  "_IOServiceGetMatchingServices", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
  "_CFRelease", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
      __CFString const* getDictionaryItemAsRef<__CFString const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFArray const* getDictionaryItemAsRef<__CFArray const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFNumber const* getDictionaryItemAsRef<__CFNumber const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
  "_CFArrayGetValueAtIndex", referenced from:
      __CFDictionary const* getArrayItemAsRef<__CFDictionary const*>(__CFArray const*, long)in libOIS.a(MacHIDManager.o)
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_CFGetTypeID", referenced from:
      __CFDictionary const* getArrayItemAsRef<__CFDictionary const*>(__CFArray const*, long)in libOIS.a(MacHIDManager.o)
      __CFString const* getDictionaryItemAsRef<__CFString const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFArray const* getDictionaryItemAsRef<__CFArray const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFNumber const* getDictionaryItemAsRef<__CFNumber const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_CFDictionaryGetTypeID", referenced from:
      __CFDictionary const* getArrayItemAsRef<__CFDictionary const*>(__CFArray const*, long)in libOIS.a(MacHIDManager.o)
  "_CFStringCreateWithCString", referenced from:
      __CFString const* getDictionaryItemAsRef<__CFString const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFArray const* getDictionaryItemAsRef<__CFArray const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFNumber const* getDictionaryItemAsRef<__CFNumber const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
  "_CFDictionaryGetValue", referenced from:
      __CFString const* getDictionaryItemAsRef<__CFString const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFArray const* getDictionaryItemAsRef<__CFArray const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      __CFNumber const* getDictionaryItemAsRef<__CFNumber const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_CFStringGetTypeID", referenced from:
      __CFString const* getDictionaryItemAsRef<__CFString const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
  "_CFArrayGetTypeID", referenced from:
      __CFArray const* getDictionaryItemAsRef<__CFArray const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
  "_CFNumberGetTypeID", referenced from:
      __CFNumber const* getDictionaryItemAsRef<__CFNumber const*>(__CFDictionary const*, char const*)in libOIS.a(MacHIDManager.o)
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_CFArrayGetCount", referenced from:
      OIS::MacHIDManager::parseDevicePropertiesGroup(__CFDictionary const*)  in libOIS.a(MacHIDManager.o)
      OIS::MacHIDManager::parseDeviceProperties(__CFDictionary const*)  in libOIS.a(MacHIDManager.o)
      OIS::MacHIDManager::enumerateDeviceProperties(__CFDictionary*)       in libOIS.a(MacHIDManager.o)
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_CFStringGetSystemEncoding", referenced from:
      OIS::MacHIDManager::enumerateDeviceProperties(__CFDictionary*)       in libOIS.a(MacHIDManager.o)
  "_CFStringGetCStringPtr", referenced from:
      OIS::MacHIDManager::enumerateDeviceProperties(__CFDictionary*)       in libOIS.a(MacHIDManager.o)
  "_IORegistryEntryCreateCFProperties", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_CFUUIDGetConstantUUIDWithBytes", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_IOCreatePlugInInterfaceForService", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_CFUUIDGetUUIDBytes", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_IODestroyPlugInInterface", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_IOIteratorNext", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_IOObjectRelease", referenced from:
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_kCFAllocatorDefault", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
      OIS::MacHIDManager::iterateAndOpenDevices(unsigned int)in libOIS.a(MacHIDManager.o)
  "_kIOMasterPortDefault", referenced from:
      OIS::MacHIDManager::lookUpDevices(int, int)in libOIS.a(MacHIDManager.o)
  "_CFNumberGetValue", referenced from:
      OIS::MacJoyStick::_enumerateCookies()      in libOIS.a(MacJoyStick.o)
  "_objc_msgSendSuper", referenced from:
      -[CocoaKeyboardView init] in libOIS.a(CocoaKeyboard.o)
      -[CocoaMouseView initWithFrame:] in libOIS.a(CocoaMouse.o)
  "_objc_msgSend_fpret", referenced from:
      -[CocoaKeyboardView keyUp:] in libOIS.a(CocoaKeyboard.o)
      -[CocoaKeyboardView flagsChanged:] in libOIS.a(CocoaKeyboard.o)
      -[CocoaKeyboardView keyDown:] in libOIS.a(CocoaKeyboard.o)
      -[CocoaMouseView scrollWheel:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseMoved:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseDragged:] in libOIS.a(CocoaMouse.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libOIS.a(CocoaMouse.o)
      CFString in libOIS.a(MacHIDManager.o)
      CFString in libOIS.a(MacHIDManager.o)
      CFString in libOIS.a(MacJoyStick.o)
      CFString in libOIS.a(MacJoyStick.o)
      CFString in libOIS.a(MacJoyStick.o)
      CFString in libOIS.a(MacJoyStick.o)
      ...
  "_objc_msgSend_stret", referenced from:
      -[CocoaMouseView initWithFrame:] in libOIS.a(CocoaMouse.o)
      -[CocoaMouseView mouseEntered:] in libOIS.a(CocoaMouse.o)
      OIS::CocoaMouse::CocoaMouse(OIS::InputManager*, bool)in libOIS.a(CocoaMouse.o)
  ".objc_class_name_NSWindow", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(OISInputManager.o)
  ".objc_class_name_NSApplication", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(CocoaInputManager.o)
  ".objc_class_name_NSResponder", referenced from:
      .objc_class_name_CocoaKeyboardView in libOIS.a(CocoaKeyboard.o)
  ".objc_class_name_NSTrackingArea", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(CocoaMouse.o)
  ".objc_class_name_NSNumber", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(CocoaMouse.o)
  ".objc_class_name_NSDictionary", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(CocoaMouse.o)
  ".objc_class_name_NSAutoreleasePool", referenced from:
      pointer-to-literal-objc-class-name in libOIS.a(CocoaMouse.o)
  ".objc_class_name_NSView", referenced from:
      .objc_class_name_CocoaMouseView in libOIS.a(CocoaMouse.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
I am not able to understand these errors :(
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: OSX, error: framework not found OGRE

Post by masterfalcon » Wed May 04, 2011 11:20 pm

Those are missing symbols which means that you need to link with some other libraries so that those symbols can be resolved. In this case, I'd start with Carbon, Foundation, CoreGraphics and IOKit.
0 x

alberteddu
Gnoblar
Posts: 6
Joined: Sun Jan 10, 2010 12:53 am

Re: OSX, error: framework not found OGRE

Post by alberteddu » Wed May 04, 2011 11:48 pm

masterfalcon wrote:Those are missing symbols which means that you need to link with some other libraries so that those symbols can be resolved. In this case, I'd start with Carbon, Foundation, CoreGraphics and IOKit.
Thanks! That was the problem. Also I added AppKit, and all seems to be working now. Again, Thanks!
0 x

guillaumequest
Kobold
Posts: 32
Joined: Thu Aug 11, 2011 10:00 pm

Re: [SOLVED] OSX, error: framework not found OGRE

Post by guillaumequest » Sat Aug 13, 2011 3:39 pm

I'm having the same problem but I can't figure out how I can link these libraries... Is it in the XCode projects settings ? Where ?
0 x

alberteddu
Gnoblar
Posts: 6
Joined: Sun Jan 10, 2010 12:53 am

Re: [SOLVED] OSX, error: framework not found OGRE

Post by alberteddu » Sat Aug 13, 2011 7:36 pm

If you are using Xcode 4, Select the first item in the right (the one with the blue icon that has the name of your project), then select your target and add the frameworks with the plus button.

See here http://cl.ly/232p2s2x2E2V1i3X0Q0i

If you are not using Xcode 4, try by right-clicking the project name > Add Existing Frameworks.

See Here http://www.blog.developeritalia.net/wp- ... 1-copy.png
0 x

guillaumequest
Kobold
Posts: 32
Joined: Thu Aug 11, 2011 10:00 pm

Re: [SOLVED] OSX, error: framework not found OGRE

Post by guillaumequest » Sun Aug 14, 2011 9:00 am

Thanks a lot !
0 x

Post Reply