i found many posts here about this type of error but no answer really helped me, when i try to build my project i get this build error :
ld: library not found for -lMapView
collect2: ld returned 1 exit status
Command
The complete error report is below :
Check dependencies
Ld build/Debug-iphonesimulator/TopStation.app/TopStation normal i386
cd "/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStation"
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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk "-L/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStation/build/Debug-iphonesimulator" "-L/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStati开发者_运维技巧on" "-F/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStation/build/Debug-iphonesimulator" -filelist "/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStation/build/TopStation.build/Debug-iphonesimulator/TopStation.build/Objects-normal/i386/TopStation.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreLocation -framework MapKit -framework CFNetwork -framework SystemConfiguration -framework MobileCoreServices -lz.1.2.3 -framework QuartzCore -lMapView -lsqlite3 -o "/Volumes/NO NAME/iPhone_V30.2_11aout2011/TopStation/build/Debug-iphonesimulator/TopStation.app/TopStation"
ld: library not found for -lMapView
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Thanx in advance for any help :)
Try to add your library path to the Library Search Path in the Build Settings of the Active Target. Follow this link: XCode Compiler Error: ld: library not found for -loauth
Assuming you have embedded the MapView project properly, check that the architectures for both the MapView project and build target match the architectures on your project.
If you have armv6 and armv7 for your project selected and the MapView project only has armv7 then you will get this error. In my case, I was building my project for both armv6 and armv7 but the MapView project was only getting built for armv7, by adding armv6 I solved the issue.
精彩评论