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.
I get "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1"
Description:
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"
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.
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
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.
In the Linker section ensure that it is "Other Linker Flags" -ObjC -all_load
I mistakenly entered -ObjC - all_load
The space after the second dash was the cause.
I forgot to include libRestKit.a and receive the same error. Adding the image to help others like me.

来源:https://stackoverflow.com/questions/8917597/restkit-linker-error