Can anyone explain why I get different results when compiling the same XCode 4.x project using the GUI and xcodebuild command-line?
XCode GUI
xcodebuild
Results in the following errors:
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fvisibility=hidden -mmacosx-version-min=10.4 -c "/Users/XXX/Extensions/NSFileManager_Extensions.m" -o "/Users/XXX/Developer/Intermediates/YourApp.build/Release/YourApp.build/Objects-normal/ppc/NSFileManager_Extensions.o" /Users/XXX/Extensions/NSFileManager_Extensions.m:15:60: error: ToxicRegularExpressions/ToxicRegularExpressions.h: No such file or directory ** BUILD FAILED **
The following build commands failed: CompileC "/Users/XXX/Developer/Intermediates/YourApp.build/Release/YourApp.build/Objects-normal/ppc/NSFileManager_Extensions.o" /Users/XXX/Extensions/NSFileManager_Extensions.m normal ppc objective-c com.apple.compilers.gcc.4_0
And finally GUI + xcodebuild
The XcodeBuild build helper is a wrapper around the command line invocation of Xcode. It will abstract the calls like xcodebuild -project app. xcodeproj -configuration <config> -arch.
In general, Xcode has to do tasks like preprocess source files and compile them by compiler, link source code by linker, copy and process resources like headers, asset catalogues and storyboards, And finally code sign and maybe even do some custom work in a shell script or a make file like building API documentation ...
DESCRIPTION. xcrun provides a means to locate or invoke coexistence- and platform- aware developer tools from the command-line, without requiring users to modify makefiles or otherwise take inconvenient measures to support mul- tiple Xcode tool chains.
Other developers, including Apple, have a Build number comprised of a major version + minor version + number of builds for the release. These are the actual software version numbers, as opposed to the values used for marketing. If you go to Xcode menu > About Xcode, you'll see the Version and Build numbers.
Try passing the SDK on the command line, like so:
xcodebuild -configuration Release -sdk iphonesimulator3.0
Specify the scheme you want to build with -scheme
. Without it xcodebuild
may use the "legacy" target driven build system, which is different. You may want to make some of your schemes shared for this, when redistributing projects.
See: Postscriptum of xcodebuild driving me nuts again with a zombie OBJROOT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With