简体   繁体   中英

i have trouble about build iOS project in terminal with xcodebuild

I have a iOS peoject. it run on my iPhone & iPad as well. Now I want build the project in terminal with xcodebuild . But i get errors, it likes that:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch armv7 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wmissing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-conversion -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=3.2 -I/Users/zhangyangjing/Desktop/556/Tabster/build/Tabster.build/Release-iphoneos/Tabster.build/Tabster.hmap -I/Users/zhangyangjing/Desktop/556/Tabster/build/Release-iphoneos/include -I/Users/zhangyangjing/Desktop/556/Tabster/build/Tabster.build/Release-iphoneos/Tabster.build/DerivedSources/armv7 -I/Users/zhangyangjing/Desktop/556/Tabster/build/Tabster.build/Release-iphoneos/Tabster.build/DerivedSources -F/Users/zhangyangjing/Desktop/556/Tabster/build/Release-iphoneos --serialize-diagnostics /var/folders/34/1khlf2gx2t5bkm3llcs1mhmr0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Prefix-dnpnglnqyykokvgarilsbxpvuaap/Prefix.pch.dia -c /Users/zhangyangjing/Desktop/556/Tabster/Prefix.pch -o /var/folders/34/1khlf2gx2t5bkm3llcs1mhmr0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Prefix-dnpnglnqyykokvgarilsbxpvuaap/Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/34/1khlf2gx2t5bkm3llcs1mhmr0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Prefix-dnpnglnqyykokvgarilsbxpvuaap/Prefix.pch.d
In file included from /Users/zhangyangjing/Desktop/556/Tabster/Prefix.pch:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:38:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:108:16: fatal error: 'CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h' file not found
      #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>

** BUILD FAILED **

The following build commands failed:

ProcessPCH /var/folders/34/1khlf2gx2t5bkm3llcs1mhmr0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Prefix-dnpnglnqyykokvgarilsbxpvuaap/Prefix.pch.pth Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I have tried demo project from Apple, they got errors as same. I am crazying, who can help me?

i resolve it. just do:

cd /usr/bin
rm xcodebuild
ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild xcodebuild

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM