繁体   English   中英

Xcode 4.5和iOS 6与Tapuku库的链接错误

[英]Xcode 4.5 & iOS 6 Linking error with Tapuku Library

当我的项目可以在iOS设备上运行时,我只会收到此错误。 有没有人遇到过类似的问题? 我试图在设备上运行我的项目。 我到处都在寻找,无法找到解决方案。 任何帮助,将不胜感激。

Ld /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/McKendree.app/McKendree normal armv7
    cd /Users/dapage/Developer/workspace/McKendree
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
    setenv 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/iPhoneOS6.0.sdk -L/Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos -L/Users/dapage/Developer/workspace/McKendree -L/Users/dapage/Developer/workspace/McKendree/Libraries -L/Users/dapage/Developer/workspace/McKendree/Libraries/OAuthConsumer -L/Users/dapage/Developer/workspace/McKendree/Libraries/TestFlight -L/Users/dapage/Developer/workspace/McKendree/../../../Downloads/TestFlightSDK1 -F/Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos -filelist "/Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Intermediates/McKendree University.build/Debug-iphoneos/McKendree.build/Objects-normal/armv7/McKendree.LinkFileList" -dead_strip -ObjC -fobjc-link-runtime -miphoneos-version-min=4.0 /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20UI.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20UINavigator.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libextThree20XML.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20Core.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20Network.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libThree20Style.a /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libTapkuLibrary.a -framework AddressBook -framework AddressBookUI -framework AudioToolbox -lz -framework QuartzCore -framework Foundation -framework UIKit -framework CoreGraphics -framework MapKit -framework MessageUI -framework MediaPlayer -framework AVFoundation -framework SystemConfiguration -framework CoreLocation -lxml2 -lsqlite3.0 -framework CFNetwork -framework Security -lOAuth -lTestFlight -o /Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/McKendree.app/McKendree\

错误是:

clang: error: no such file or directory: '/Users/dapage/Library/Developer/Xcode/DerivedData/McKendree_University-clkfusicbtxoumeeuoisuduipobw/Build/Products/Debug-iphoneos/libTapkuLibrary.a'

确保库二进制文件位于项目根目录下,并将其添加为引用。 您可以通过在项目浏览器(Cmd-1)中选择项目,然后选择“构建阶段”来执行此操作。 在“将二进制文件与库链接”下,您应该具有对二进制文件的引用。 您可能还想将库二进制文件添加到项目中,该库二进制文件可能会自动作为链接的二进制文件添加到项目中。 您还可以在“构建设置”下编辑“库搜索路径”,并在其中拥有此二进制文件的位置添加文件夹。

"$(SRCROOT)/lib"

如果您在该文件夹中有二进制文件,则可能会发现这种方法更容易。 您还需要引用该库的标题,因此请查看设置标题搜索路径并将标题文件添加到项目中。

如果可以的话,我更喜欢将第三方库中的代码添加为静态库,并将它们添加为依赖项。 您可以先作为一个单独的项目来完成此任务,然后让它自己成功构建。 然后,您可以将该项目文件拖到Xcode中的另一个项目中,并将其设置为依赖项。 您将需要了解方案如何管理构建项目的依赖关系以建立子项目。 您可能会发现,这种方法比链接到预编译的库要容易得多,该库可能不包含Apple发布的设备所需的体系结构。 如果您将源代码作为依赖项,则可以构建必要的二进制版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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