After tinkering with Xcode 4 on the Mac for a couple of days and trying to get orx to compile under CodeLite for Mac, I have some across a couple of gotchas.
On the Mac, Xcode uses the MacOSX sdk. There could be various versions and they could be in various locations. This make it difficult to have a standard build configuration under orx. Though once you work out the basics of building on the Mac, there are less things to look out for.
It appears that previous versions of the MacOSX*.sdk used to live under /Developer/SDKs/
The orx build on bitbucket at the time of writing is configured to look for the following SDK and path: /Developer/SDKs/MacOSX10.6.sdk
On your Mac, this sdk version and path simply may not exist, especially if your Mac is newer or you have upgraded. From what I have read, newer SDKs are now being packaged up under the Xcode.app application folder, which is a little cheeky.
You have two choices:
1) Download the expected SDK from the web and save it to the location expected by the orx project build configurations.
2) Change the config to point to an SDK hidden in the Xcode folders.
You'll need to get your terminal running and go hunting under your Xcode application folder to see what SDKs are available. In my case, sdks were located at:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
So you can change your Xcode compiler sdk paths to:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk;
Now orx should compile.
Comments
Now that the thread branch got merged back into default, I'm about to update to XCode 5 / OS X 10.9 in the coming days.
We'll see if XCode 5 breaks things further.
Lemme know if you have any issues.
I'll press on.
There shouldn't be any explicit SDK mention anymore, unless premake adds them at some point (which would surprise me, but heh).
Could you list the steps you followed + logs?
Because the premake doesn't mention sdk, orx and orxlib projects will need to be set to use "Latest MacOSX SDK". Otherwise you'll see build errors like missing "TargetConditionals.h".
Apparently the missing SDK issue will disappear with newer versions of OSX/XCode but there's also a patch for premake4 that allows to correct this and even add iOS support. I'll investigate this shortly.