Bất cứ ai có thể giải thích tại sao tôi nhận được kết quả khác nhau khi biên dịch cùng một dự án XCode 4.x bằng cách sử dụng GUI và xcodebuild dòng lệnh?Tại sao nhận được sự khác biệt giữa việc sử dụng XCode và xcodebuild?
XCode GUI
- Thực hiện một sạch
- xây dựng "Release" mục tiêu
- xây dựng thành công
xcodebuild
-
.210
- Thực hiện một sạch
- Run "xcodebuild -Cấu hình Release"
Kết quả trong các lỗi sau đây:
/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: lỗi: ToxicRegularExpressions/ToxicReg ularExpressions.h: Không có tập tin hoặc thư mục ** BUILD FAILED **
Sau đây xây dựng lệnh thất bại: CompileC "/Users/XXX/Developer/Intermediates/YourApp.build/Release/YourApp.build /Objects-normal/ppc/NSFileManager_Extensions.o" /Users/XXX/Extensions/NSFileManager_Extensions.m bình thường ppc Objective-c com.apple.compilers.gcc.4_0
Và cuối cùng GUI + xcodebuild
- Per tạo thành một sạch trong GUI
- xây dựng "Release" mục tiêu
- xây dựng thành công
- Run "xcodebuild -Cấu hình Release"
- xây dựng thành công
Xin lỗi, tôi đã nhầm. Vấn đề KHÔNG được giải quyết bằng cách thêm tùy chọn -sdk –