GHUnit CLI Build: Availability.h errors
I am trying to do a command line build of a GHUnit target which builds fine inside Xcode. I am running the following command to build:
GHUNIT_CLI=1 xcodebuild -target BasicBrowserUnitTest -configuration Debug -sdk iphonesim开发者_运维知识库ulator4.0 build
It gets along pretty nice, until it finds an error in Availability.h, an SDK header:
/Xcode4 GM/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/usr/include/AvailabilityInternal.h:56:42: error: operator '<' has no left operand
Obviously, I haven't made any changes to Apple's stuff, why am I getting this error and how do I fix it?
The problem is that I wasn't specifying the correct SDK version:
GHUNIT_CLI=1 xcodebuild -target BasicBrowserUnitTest -configuration Debug -sdk iphonesimulator4.0 build
Needed to be:
GHUNIT_CLI=1 xcodebuild -target BasicBrowserUnitTest -configuration Debug -sdk iphonesimulator4.3 build
Or in this case, the latest SDK version.
精彩评论