我已将xcode更新为xcode5.1,现在无法运行现有项目。以下是我得到的错误。我在这个项目中添加了静态库。我也在使用外部框架,IOKit框架。我不明白为什么我会收到这个错误。它与xcode5.0.2完美配合。错误如下:
Ld /Users/xxxxx/armv7/xxx normal armv7
cd /Users/xxxx
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Users/xxx-cmjabkmgfntwxeedtebsizdngzry/Build/Products/Debug-iphoneos -L/Users/xxx -F/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-cmjabkmgfntwxeedtebsizdngzry/Build/Products/Debug-iphoneos -F/Users/xxxcmjabkmgfntwxeedtebsizdngzry/Build/Intermediates/xxx.build/Debug-iphoneos/xxx.build/Objects-normal/armv7/xxx.LinkFileList -dead_strip -ObjC -fobjc-link-runtime -miphoneos-version-min=6.0 -lIOKit -lLIBRARY_TEST -lsqlite3 -framework SystemConfiguration -framework CoreMedia -lxml2.2 -lxml2 -framework MobileCoreServices -framework AVFoundation -framework AudioToolbox -framework CoreMotion -framework MediaPlayer -framework QuartzCore -framework CoreTelephony -framework CoreGraphics -llockdown -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/xxx-cmjabkmgfntwxeedtebsizdngzry/Build/Intermediates/xxx.build/Debug-iphoneos/xxx.build/Objects-normal/armv7/xxx_dependency_info.dat -o /Users/xxx-cmjabkmgfntwxeedtebsizdngzry/Build/Intermediates/xxx.build/Debug-iphoneos/xxx.build/Objects-normal/armv7/xxx
请考虑xxx是我项目的路径。
ld: library not found for -lIOKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我尝试更改与架构相关的所有设置但没有运气。任何帮助赞赏。
答案 0 :(得分:0)
手动将库搜索路径添加到您添加了libs的finder中。
项目设置 - >构建设置 - >图书馆搜索路径 - > “../ProjectDirectory/Static library path”