Xcode 4 gcc-4.2失败,退出代码为1

时间:2011-07-14 02:01:22

标签: xcode gcc

知道为什么我的构建在以下过程中失败了吗?我在这个项目中有另外两个目标,它们构建得很好。基于此问题,我看不出任何明确的理由。我已经比较了每个目标中的所有构建设置,并且所有构建设置似乎都很好/相同。

感谢任何帮助。

ProcessPCH /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/PrecompiledHeaders/MyApp_Prefix-bknmhqekgexlchfcpbduwcqlcafa/MyApp_Prefix.pch.gch MyApp_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
    cd /Users/me/Development/myapp/trunk
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch armv7 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -DDEBUG_LOGS_ON -DMyApp -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -gdwarf-2 -fvisibility=hidden -mthumb -miphoneos-version-min=4.2 -iquote "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-generated-files.hmap" "-I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-own-target-headers.hmap" "-I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-all-target-headers.hmap" -iquote "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-project-headers.hmap" -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Products/Debug-iphoneos/include -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/libxml2 -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/DerivedSources/armv7 -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/DerivedSources -F/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Products/Debug-iphoneos -c /Users/me/Development/myapp/trunk/MyApp_Prefix.pch -o /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/PrecompiledHeaders/MyApp_Prefix-bknmhqekgexlchfcpbduwcqlcafa/MyApp_Prefix.pch.gch

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

2 个答案:

答案 0 :(得分:2)

好的,想通了。我有一个这个目标的预处理器宏,它以一个数字开头,例如“123TEST”,显然编译器不喜欢数字,“TEST123”工作正常。

答案 1 :(得分:0)

您需要查看MyApp_Prefix.pch。编译器不喜欢它。