[Solved] Linking errors on MacOS X 10.6 Snow Leopard

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

[Solved] Linking errors on MacOS X 10.6 Snow Leopard

Post by fabietto »

Dear all,

I just finished to compile the latest version of Irrlicht (1.6) on my laptop (a MacBook Air running MacOS X 10.6 Snow Leopard). Both the compiling of the library and of a few examples went alright. The examples seem running smoothly.

I've instead experienced an issue while compiling one of the applications written by myself. This application can compile (I just had to do some minor changes to the parameters passed to the createDevice() function), but returns me a few errors during the linking phase. These errors are the following. Please consider that my application doesn't use any joystick and no joystick related functions are ever called.

Undefined symbols:
"_IOServiceMatching", referenced from:
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IOIteratorNext", referenced from:
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IOServiceGetMatchingServices", referenced from:
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IOObjectRelease", referenced from:
getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlicht.a(CIrrDeviceMacOSX.o)
getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlicht.a(CIrrDeviceMacOSX.o)
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IORegistryEntryGetParentEntry", referenced from:
getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlicht.a(CIrrDeviceMacOSX.o)
getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IORegistryEntryCreateCFProperties", referenced from:
getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlicht.a(CIrrDeviceMacOSX.o)
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IOCreatePlugInInterfaceForService", referenced from:
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
"_IOMasterPort", referenced from:
irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlicht.a(CIrrDeviceMacOSX.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Hope this helps,
Fabio
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

in IrrlichtCompileConfig.h

IRR_COMPILE_WITH_ allows removing things from the engine ,

Find _IRR_COMPILE_WITH_JOYSTICK something, its near the top.

Comment that part out for now
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

Post by fabietto »

FuzzYspo0N wrote:in IrrlichtCompileConfig.h

IRR_COMPILE_WITH_ allows removing things from the engine ,

Find _IRR_COMPILE_WITH_JOYSTICK something, its near the top.

Comment that part out for now
Hi Fuzzy,

thanks for your hint.

I've commented out that part of IrrlichtCompileConfig.h (line #99, #define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_) and recompiled the library. My application now works.

Many thanks,
Fabio
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

Post by fabietto »

Same issue with another computer running MacOS X Leopard 10.5.8. Solved at the same way.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to include the IO Framework or whatever it's called. Will be fixed once bitplane releases the OSX Irrlicht SDK.
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

Post by DavidJE13 »

IOKit.framework to be precise

Is it even a bug that it needs this? I've always seen it like the requirement for OpenGL.framework
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

Post by fabietto »

DavidJE13 wrote:Is it even a bug that it needs this? I've always seen it like the requirement for OpenGL.framework
Unfortunately I'm not a big expert on MacOS programming. The only thing I can say is that my application was compiling/linking/running properly using Irrlicht 1.4.2.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

If I find time this weekend I'll make a start on the .framework release for 1.6 and update the project files. The reason it will take some time is because I'll need to fix the installer and make sure it upgrades properly so 1.5.1 and 1.6 apps can both run on the same system. I will also have to bugfix the 1.5.1 installer so that installing 1.5.1 over 1.6 doesn't cause problems.
I may also buy Snow Leopard and upgrade to the latest version of Xcode, though no promises here. All this will be next week at the earliest, since I've got other (more fun) projects to work on too!
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply