RestKit链接器错误 [英] RestKit Linker error
问题描述
我一直在关注RestKit安装说明,但是当我尝试构建应用程序时,我现在遇到了错误。这是针对ios,iPad特定的。
I have been following the RestKit installation instructions but I now have an error when I try to build the app. This is for ios, iPad specific.
我得到Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang失败,退出代码为1
I get "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1"
描述:
Ld build/Debug-iphonesimulator/iDoor.app/iDoor normal i386
cd "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -
isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk "-L/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator" "-F/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator" -filelist "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/iDoor.build/Debug-iphonesimulator/iDoor.build/Objects-normal/i386/iDoor.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC - all_load -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework Security -lxml2 -framework SystemConfiguration -framework MobileCoreServices -framework CoreData -framework CFNetwork -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/User/Dropbox/darxstudios/FatCow Games/iDoor/build/Debug-iphonesimulator/iDoor.app/iDoor"
我不是使用XCode的专家,但几乎看起来它想要部署为MAC OSX,但我已经为ios设置了目标。任何帮助将不胜感激。
I am not an expert of using XCode but it almost appears that it wants to deploy as MAC OSX but I have the targets setup for ios. Any help would be appreciated.
此外,我没有添加RestKit.framework(mac osx版本),我遵循安装RestKit的说明: https://github.com/RestKit/RestKit/wiki/Installing- RestKit-in-Xcode-4.x
Also I do not have RestKit.framework added (the mac osx version) and i was following the instructions for installing RestKit here: https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
进一步观察后,我注意到在Link Binary With Libraries中,libRestKit.a为红色。我想这可能是一个部分或整个问题......
After looking further i notice that in the "Link Binary With Libraries" the libRestKit.a is red. I am thinking that may be a part or the whole issue...
推荐答案
所以我找到了答案,我不能相信我错过了这个非常简单的事情。希望这将有助于其他任何有此问题的人。
So I found the answer, I can't believe I missed this very simple thing. Hopefully this will help anyone else who has this issue.
在链接器部分确保它是其他链接器标志 -ObjC -all_load
In the Linker section ensure that it is "Other Linker Flags" -ObjC -all_load
我错误输入 -ObjC - all_load
秒后的空格破折号是原因。
I mistakenly entered -ObjC - all_load
The space after the second dash was the cause.
这篇关于RestKit链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!