views:

1260

answers:

2
+1  A: 

I'm not sure but I guess you should focus on the first error where it says it can't find AvailabilityMacros.h. I think that should be in /usr/include but I'm guessing it probably isn't since your compile line clearly shows that as one of the include paths.

If it's not there you could try to find out where it is by using find on the command line eg.

find /usr -name AvailabilityMacros.h

or whatever GUI methods are available on the Mac ( you can tell I'm not that familiar with MacOS :) ). BTW if the above find command yields nothing then you can widen the search from /usr to /.


In response to your posting of the find results:

Are you trying to build your application against the MacOSX10.5.sdk? If not then I don't think that's the version you want. If you are using the 10.5 SDK then you need to set the QMAKE_MAC_SDK qmake variable to /Developer/SDKs/MacOSX10.5.sdk. You can either do this in the project file or set it as an additional argument to qmake in Projects->Build steps.

Troubadour
There is no MacOSX10.6.sdk directory in /Developer/SDKs on my machine. I am hoping that downloading the latest version of Xcode will fix this.
titaniumdecoy
Yes, I think it will.
Troubadour
And... it does.
titaniumdecoy
A: 

Thanks, Troubadour. I was able to solve the problem by adding the following line to my project's .pro file:

QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk

I would prefer to build against the Mac OS X 10.6 SDK but there is no such directory in /Developer/SDKs. If you know where I can find the 10.6 SDK please let me know.

EDIT: After updating to the latest version of Xcode, I was able to remove the line indicated above from my project's .pro file and compile successfully.

titaniumdecoy
Setting the include path is not the way to go to get at the SDK. See my edited answer for details of how to build against a particular SDK. I suspect though that's not what you are trying to do. I think you're trying to build your application just on 10.6 itself. Is that right?
Troubadour
I think you get it from developer.apple.com after you've signed up for a developer account.
Troubadour