我昨天升级到最新的 MonoTouch / MonoDevelop 版本,现在我的应用程序在编译时抛出以下错误:
error MT5201: Native linking failed. Please review user flags provided to gcc: "-lz" "-lxml2"
我在构建中使用以下内容,因为我使用的链接库需要 libz.dylib。-gcc_flags "-lz -lxml2"
我现在的环境是:
MonoDevelop 3.0.5
Installation UUID: 5022d668-f236-4223-a074-6c050535bd3f
Runtime:
Mono 2.10.9 (tarball)
GTK 2.24.10
GTK# (2.12.0.0)
Package version: 210090011
Apple Developer Tools:
Xcode 4.5.2 (1847)
Build 4G2008a
Monotouch: 6.0.7
Mono for Android: Not Installed
Build information:
Release ID: 30005000
Git revision: e159cf083bd327933166819d94245298898d6e3d
Build date: 2012-10-24 16:43:06+0000
Xamarin addins: eea2ed91ae8dd242b281d5ec8f6c2fbc63b4cd3d
Operating System:
Mac OS X 10.7.5
Darwin My-Mac-mini-2.local 11.4.2 Darwin Kernel Version 11.4.2
Thu Aug 23 16:25:48 PDT 2012
root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
最初除了将 MonoTouch / MonoDevelop 更新为最新的稳定版本外,没有任何变化。在更新时,我必须重新授权 MonoTouch,所以我这样做了,并且安装得很好。比构建它失败了。我比更新 Xcode 希望能解决它,因为我在最新的 Xcode 上,但它没有。
无关,这不是我更新后唯一的问题。在另一个项目中,我的视图以 90 度旋转显示,但不要担心。只是提到它以防它可能有助于解决问题,因为我的升级可能出了问题?
添加构建错误信息:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=6.0 -arch i386 -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -c /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/main.i386.m -o /Users/Company/Projects/App/4-PDF2/App.Kiosk/obj/Debug/mtouch-cache/main..i386.cache.xT4QTbvqc0Zrv4eGTYvIJcXuuvo=.o
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -Wl,-no_pie -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=6.0 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk /Users/Company/Projects/App/4-PDF2/App.Kiosk/obj/Debug/mtouch-cache/main..i386.cache.xT4QTbvqc0Zrv4eGTYvIJcXuuvo=.o -o /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/AppKiosk -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework Social -framework StoreKit -framework Twitter -framework UIKit -framework PassKit -framework AddressBookUI -framework SystemConfiguration -framework AddressBook -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreText -framework ImageIO -framework MobileCoreServices -framework Security -framework CoreData -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework AdSupport -framework QuickLook -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -liconv -lmonosgen-2.0 -lmonotouch-sgen -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -lmono-profiler-log -u _mono_profiler_startup_log -u _catch_exception_raise -force_load /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/libPSPDF-ios5.1.a -force_load /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/libBARCODE-iphoneos.a "-lz" "-lxml2"
Process exited with code 1, command:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -Wl,-no_pie -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=6.0 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk /Users/Company/Projects/App/4-PDF2/App.Kiosk/obj/Debug/mtouch-cache/main..i386.cache.xT4QTbvqc0Zrv4eGTYvIJcXuuvo=.o -o /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/AppKiosk -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework Social -framework StoreKit -framework Twitter -framework UIKit -framework Paerror MT5201: Native linking failed. Please review user flags provided to gcc: "-lz" "-lxml2"
ssKit -framework AddressBookUI -framework SystemConfiguration -framework AddressBook -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreText -framework ImageIO -framework MobileCoreServices -framework Security -framework CoreData -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework AdSupport -framework QuickLook -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -liconv -lmonosgen-2.0 -lmonotouch-sgen -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -lmono-profiler-log -u _mono_profiler_startup_log -u _catch_exception_raise -force_load /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/libPSPDF-ios5.1.a -force_load /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/libBARCODE-iphoneos.a "-lz" "-lxml2"
ld: file not found: /var/folders/ln/yb817btn4_s7b52rhfk80cmm0000gn/T/tmp478d0592.tmp/libBARCODE-iphoneos.a
collect2: ld returned 1 exit status