Xcode linker error in iPhone application (simulator only)

I get this linker error that will not allow me to compile. This only happens on the simulator.


KEY POINTS:
- It only happens in the simulator
- Similar to THIS question , but did not find FRAMEWORK_SEARCH_PATHS in my .pbxproj file
- Although my OS is 10.6.2, I had to create a goal of 1.5 to avoid other linker errors.
- libxml2.dylib IS is required and is in my Frameworks group
- Other cited libraries that I have never heard of.
- The attempt to attract other Lieb within the framework did not resolve.



Build SpaceTweet of project SpaceTweet with configuration Debug Ld build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet normal i386 cd "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)" setenv MACOSX_DEPLOYMENT_TARGET 10.5 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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -L/Users/Scott/Desktop "-L/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/../../libYAJLIPhone-0" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/usr/lib -L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib "-F/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator" -filelist "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/SpaceTweet.build/Debug-iphonesimulator/SpaceTweet.build/Objects-normal/i386/SpaceTweet.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AVFoundation -framework MessageUI -lYAJLIPhone -lxml2 -o "/Users/Scott/Desktop/iPhone Dev/SpaceTweet(Experimental)/build/Debug-iphonesimulator/SpaceTweet.app/SpaceTweet" ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 



CLUE:
Again, my question is very similar to THIS RESOLVED QUESTION , except that in my case I did NOT find the FRAMEWORK_SEARCH_PATHS entry in the .pbxproj file in my project package and therefore could not decide how this issue was resolved.

+1
compiler-construction iphone xcode ios-simulator osx-snow-leopard
source share
3 answers

The problem is this:

 -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib 

This suggests that your Simulator (i386) is going to use files from the device (arm) / usr / lib.

Find your target where / usr / lib (just use the search bubble on the β€œGet Info / Settings” tab) and delete it. The compiler will use the correct usr / lib platform if it does not use the wrong one at first.

+12
source share

I have the same problem. And it turns out that my release version code is running in a debugging environment. Click "Edit Schema ..." and change the "Assembly Configuration" to solve the problem.

+2
source share

The same thing happened to you. I uninstalled and added all my frameworks and still had the same problem. To get rid of the error, I had to remove the path pointing to the intruder library from the library search paths in the build settings.

0
source share

All Articles