Topic: Setting up on Intel Mac

Hello! I'm having some trouble getting this to work!

This is what I've done:

1. Built the libIrrlicht.a in xcode

2. Copied the irrlicht.mod to blitzmax/mod/ folder

3. Copied the libIrrlicht.a file to core.mod folder (this replaced the one currently there).

4. Renamed the libIrrlicht.a to libIrrlichtMac.a

5. Started Blitzmax IDE, selected Rebuild All Modules

After doing all this, none of the examples work.

Running any example gives me pages of warnings then a final build error of: Build Error: Failed to link /Applications/BlitzMax/mod/irrlicht.mod/examples/01.HelloWorld/01.helloworld.debug.app/Contents/MacOS/01.helloworld.debug

I also tried compiling core.bmx only to recieve "module does not match commandline module" and highlights the line "Module Irrlicht.Core"


Thanks!

Re: Setting up on Intel Mac

Hi jaydubeww,


I have the same problem when trying to compile any example.
Have you managed to get it to work?
I know this error, I got it when I was trying to compile Irrlicht with C++, but there I just had to set the linker path to the library directory, but I don't know how I can do this with Bmax.


Thank you.

Re: Setting up on Intel Mac

Ok, now I'm one step ahead, after I wrote this at top of my file:

Import "-w -L/Applications/BlitzMax/mod/irrlicht.mod/core.mod /Applications/BlitzMax/mod/irrlicht.mod/core.mod/libIrrlichtMac.a"

But now I get the following errors:

Undefined symbols:
  "_IOServiceMatching", referenced from:
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IOIteratorNext", referenced from:
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IOServiceGetMatchingServices", referenced from:
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IOObjectRelease", referenced from:
      getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
      getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IORegistryEntryGetParentEntry", referenced from:
      getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
      getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IORegistryEntryCreateCFProperties", referenced from:
      getJoystickDeviceInfo(unsigned int, __CFDictionary*, JoystickInfo*)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IOCreatePlugInInterfaceForService", referenced from:
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
  "_IOMasterPort", referenced from:
      irr::CIrrDeviceMacOSX::activateJoysticks(irr::core::array<irr::SJoystickInfo, irr::core::irrAllocator<irr::SJoystickInfo> >&)in libIrrlichtMac.a(CIrrDeviceMacOSX.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build Error: Failed to link /Applications/BlitzMax/mod/irrlicht.mod/examples/01.HelloWorld/01.helloworld.app/Contents/MacOS/01.helloworld

It would be very cool, if someone knows a solution for this.
And the Lib is ok, because it works well with C++.

Re: Setting up on Intel Mac

Ok, I solved the errors from my last Post by adding "-framework IOKit" to the Import Statement and it now looks like this:

Import "-w -L/Applications/BlitzMax/mod/irrlicht.mod/core.mod /Applications/BlitzMax/mod/irrlicht.mod/core.mod/libIrrlichtMac.a -framework IOKit"

But now I get the following error (I tried to directly Implement Irrlicht myself and there I got it too):

_createMenuRef called with existing principal MenuRef already associated with menu

This just appears if build it as an GUI App. If I build it as an Console App then there are no errors, but it also happens nothing if I execute it.

Re: Setting up on Intel Mac

Hi Etono.  My sincere apologies for the lack of response.  My life is in a bit of a different direction right now.  It shouldn't be this difficult to get going.  I will fire up my Mac Mini tonight when I get home and see if I can get you going.  What version of BMAX are you running?

Re: Setting up on Intel Mac

Hi gman,

First, thank you for your replay and you don't have to apology since you're offering this really great work for free.
Currently I have V 1.42, but I'll switch soon to the today released V 1.43.

Re: Setting up on Intel Mac

Hi Etono.  I compiled the Mac binaries for BMAX v1.43 and put up a distribution in the announcements post.  Irrlicht for Mac needs the joystick lib commented out.  This usually isnt a problem due to BMAX already having built-in Joystick support.  undo your code changes and copy the files from the ZIP to the corresponding folders.  Try the examples and you should be good to go!

Re: Setting up on Intel Mac

Hi gman,

Thank you very ,very much for your effort, it now works like a charm for me.