2011-08-12 192 views
1

我發現這裏很多帖子關於這種類型的錯誤,但沒有答案真的幫了我,當我嘗試建立我的項目,我得到這個生成錯誤:LD:庫找不到-lMapView

ld: library not found for -lMapView 
collect2: ld returned 1 exit status 
Command 

完整錯誤報告低於:

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/TopStation" "-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 

感謝名單提前爲任何幫助:)

回答

0

假設你已經正確地嵌入的MapView項目,檢查架構來均爲 MapView項目和構建目標匹配項目上的體系結構。

如果你的項目選擇了armv6和armv7,而MapView項目只有armv7,那麼你將會得到這個錯誤。在我的情況下,我正在爲armv6和armv7構建我的項目,但MapView項目只是爲armv7構建,通過添加armv6我解決了問題。