Xcode 4.5& iOS 6与Tapuku库链接错误

时间:2012-09-23 23:20:59

标签: ios xcode three20 ios6 xcode4.5

当我的项目编译为在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'

1 个答案:

答案 0 :(得分:1)

确保库二进制文件位于项目根目录下,并将其添加为引用。您可以通过在Project Navigator(Cmd-1)中选择项目然后选择Build Phases来完成此操作。在Link Binary with Libraries下,您应该引用二进制文件。您可能还希望将库二进制文件添加到项目中,这可能会自动将其作为链接二进制文件添加到项目中。您还可以在“构建设置”下编辑“库搜索路径”,并添加具有此二进制文件的文件夹。

"$(SRCROOT)/lib"

如果你在该文件夹中有二进制文件,它可能会更容易找到它。您还需要引用此库的标题,以便查看设置标题搜索路径并将标题文件添加到项目中。

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