Compiling on OSX Lion fails

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bkmpHx
Posts: 4
Joined: Wed Aug 10, 2011 9:06 pm

Compiling on OSX Lion fails

Post by bkmpHx »

Hey all,

I have tried compiling Irrlicht on OSX Lion & haven't managed to get it working yet. Things I've tried:

- Compiling with different compilers (GCC 4.2 and 4.5, as 4.0 does not build on Lion)
- Compiling using Xcode and directly from the command line
- The installation instructions say to use GCC 4.0, I've used 4.5 and fixed a bunch of compiler errors.

By default, the Xcode project built for PPC, and it generated a static lib for PPC fine, but I can't get it building for x86_64.

I know there's not much info here, but has anyone else managed to successfully get Irrlicht compiling on OSX Lion?

Cheers,
beaker
bkmpHx
Posts: 4
Joined: Wed Aug 10, 2011 9:06 pm

Re: Compiling on OSX Lion fails

Post by bkmpHx »

Quick update: Have also compiled using 'make', and after making a couple of tweaks to the source I'm able to get it compiling as far as:

Code: Select all

In file included from COpenGLDriver.h:25,
                 from COpenGLDriver.cpp:5:
COpenGLExtensionHandler.h:33:31: error: CIrrDeviceMacOSX.h: No such file or directory
This is the case with SVN head & the zipped build of 1.7.2.
bkmpHx
Posts: 4
Joined: Wed Aug 10, 2011 9:06 pm

Re: Compiling on OSX Lion fails

Post by bkmpHx »

Another update: I have it working now - it required some Makefile & some tweaks to the source, but I have it compiling on GCC 4.5 on Lion and linking + running with my project.
Asyx
Posts: 2
Joined: Sat Aug 13, 2011 4:35 pm

Re: Compiling on OSX Lion fails

Post by Asyx »

xcodebuild -sdk macosx10.7 -arch x86_64 worked for me
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Compiling on OSX Lion fails

Post by hybrid »

Cool, sounds like my guess was right then. XCode has command line options. That's exactly what I need. Do you have to call this from the MacOSX folder, or from Irrlicht directory?
bkmpHx
Posts: 4
Joined: Wed Aug 10, 2011 9:06 pm

Re: Compiling on OSX Lion fails

Post by bkmpHx »

Asyx wrote:xcodebuild -sdk macosx10.7 -arch x86_64 worked for me
I get:

Code: Select all

aaron@salvador:~/Dev/irrlicht/source/Irrlicht/MacOSX> xcodebuild -sdk macosx10.7 -arch x86_64
2011-08-21 23:44:58.583 xcodebuild[13832:a0b] warning: compiler 'com.apple.compilers.llvmgcc42' is based on missing compiler 'com.apple.compilers.gcc.4_2'
Build settings from command line:
    ARCHS = x86_64
    SDKROOT = macosx10.7
 
=== BUILD NATIVE TARGET libIrrlicht.a OF PROJECT MacOSX WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Invalid value '4.0' for GCC_VERSION
[WARN]Unable to determine concrete GCC compiler for file /Users/aaron/Dev/irrlicht/source/Irrlicht/MacOSX/../jpeglib/jcapimin.c of type sourcecode.c.c.
[WARN]Unable to determine concrete GCC compiler for file /Users/aaron/Dev/irrlicht/source/Irrlicht/MacOSX/../jpeglib/jcapistd.c of type sourcecode.c.c.
...
... schnip, there's screenfulls of these, one per source file
...
[WARN]Unable to determine concrete GCC compiler for file /Users/aaron/Dev/irrlicht/source/Irrlicht/MacOSX/../CTRStencilShadow.cpp of type sourcecode.cpp.cpp.
[WARN]Unable to determine concrete GCC compiler for file /Users/aaron/Dev/irrlicht/source/Irrlicht/MacOSX/../CSMFMeshFileLoader.cpp of type sourcecode.cpp.cpp.
 
** BUILD FAILED **
 
 
The following build commands failed:
        Check dependencies
(1 failure)
I'm using GCC 4.5 installed via ports.
Post Reply