简体   繁体   English

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

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

I only receive this error when my project compiles for running on an iOS device. 当我的项目可以在iOS设备上运行时,我只会收到此错误。 Has anyone experienced an issue similar to this? 有没有人遇到过类似的问题? I am attempting to run my project on a device. 我试图在设备上运行我的项目。 I have looked just about everywhere and am unable to find a solution. 我到处都在寻找,无法找到解决方案。 Any help on this would be appreciated. 任何帮助,将不胜感激。

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\

The error is: 错误是:

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

Make sure that the library binary is under the project root and that you add it as a reference. 确保库二进制文件位于项目根目录下,并将其添加为引用。 You can do this by selecting the project in the Project Navigator (Cmd-1) and then select Build Phases. 您可以通过在项目浏览器(Cmd-1)中选择项目,然后选择“构建阶段”来执行此操作。 Under Link Binary with Libraries you should have a reference to the binary. 在“将二进制文件与库链接”下,您应该具有对二进制文件的引用。 You may also want to add the library binary to your project, which may automatically at it as a linked binary. 您可能还想将库二进制文件添加到项目中,该库二进制文件可能会自动作为链接的二进制文件添加到项目中。 You can also edit Library Search Paths under Build Settings and add the folder where you have this binary file. 您还可以在“构建设置”下编辑“库搜索路径”,并在其中拥有此二进制文件的位置添加文件夹。

"$(SRCROOT)/lib"

If you have the binary in that folder it may find it easier that way. 如果您在该文件夹中有二进制文件,则可能会发现这种方法更容易。 You will also need to reference headers for this library so look at setting Header Search Paths and adding the header files to your project. 您还需要引用该库的标题,因此请查看设置标题搜索路径并将标题文件添加到项目中。

If you can, I prefer to add code from third party libraries as Static Libraries and adding them as a dependency. 如果可以的话,我更喜欢将第三方库中的代码添加为静态库,并将它们添加为依赖项。 You can do this first as a separate project and get it to build successfully on it's own. 您可以先作为一个单独的项目来完成此任务,然后让它自己成功构建。 Then you can drag that project file into the other project in Xcode and set it up as a dependency. 然后,您可以将该项目文件拖到Xcode中的另一个项目中,并将其设置为依赖项。 You will need to understand how schemes manage the build project for dependencies to set up a sub-project. 您将需要了解方案如何管理构建项目的依赖关系以建立子项目。 You may find this approach to be much easier than linking to a pre-compiled library which may not include the required architectures for the devices that Apple releases. 您可能会发现,这种方法比链接到预编译的库要容易得多,该库可能不包含Apple发布的设备所需的体系结构。 If you have the source code as a dependencies you will be able to build the necessary binary versions. 如果您将源代码作为依赖项,则可以构建必要的二进制版本。

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

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