2011-03-18 81 views
0

我在我的應用程序中使用Mobclix作爲廣告,並且使用我已成功使用的btouch創建了單聲道綁定。我還爲我的項目添加了額外的GCC標誌以鏈接到Mobclix .a庫。Monotouch應用程序無法使用iOS SDK 4.3與Mobclix SDK進行鏈接

不幸的是,在更新到iOS SDK 4.3,MonoTouch 3.2.5和MonoDevelop 2.4.2後,我不再能夠在構建iOS模擬器時鏈接我的應用程序。我收到以下錯誤信息:

 
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=4.3 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk /var/folders/JD/JDES4LivFwqM8x7qnFUdg++++TI/-Tmp-/tmp4041c9f3.tmp/main.o -o /var/folders/JD/JDES4LivFwqM8x7qnFUdg++++TI/-Tmp-/tmp4041c9f3.tmp/WordfeudFree -framework CFNetwork -framework AssetsLibrary -framework CoreTelephony -framework EventKit -framework Foundation -framework CoreMotion -framework GameKit -framework MapKit -framework MediaPlayer -framework MessageUI -framework OpenGLES -framework StoreKit -framework UIKit -framework AddressBookUI -framework iAd -framework SystemConfiguration -framework AddressBook -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework ImageIO -framework Security -framework CoreMedia -framework ExternalAccessory -framework EventKitUI -framework QuickLook -lz -u _catch_exception_raise -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -liconv -lmono -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -framework AddressBook -framework AddressBookUI -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -weak_framework CoreMotion -weak_framework EventKit -framework MediaPlayer -framework MessageUI -framework QuartzCore -framework SystemConfiguration -L/Users/haakon/Code/wordfeud-work/iOS/Wordfeud.Free/Wordfeud.Free/lib -lMobclix_nonthumb -force_load /Users/haakon/Code/wordfeud-work/iOS/Wordfeud.Free/Wordfeud.Free/lib/libMobclix_nonthumb.a 
Undefined symbols: 
    "__Unwind_Resume", referenced from: 
     +[MobclixFeedback sharedInstance] in libMobclix_nonthumb.a(MobclixFeedback.o) 
     -[MobclixFeedback sendComment:] in libMobclix_nonthumb.a(MobclixFeedback.o) 
     -[MobclixAdViewInternal finishInstrumentation] in libMobclix_nonthumb.a(MobclixAdViewInternal.o) 
     -[MobclixTextAdView finishedLoadingIconURL:withImageData:] in libMobclix_nonthumb.a(MobclixTextAdView.o) 
     -[MobclixInteractiveVideoView finishedLoadingImageURL:withImageData:] in libMobclix_nonthumb.a(MobclixInteractiveVideoView.o) 
     -[MobclixBannerAdView finishedLoadingImageURL:withImageData:] in libMobclix_nonthumb.a(MobclixBannerAdView.o) 
     -[MCResourcesController playVideoImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[MCResourcesController closeIconImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[MCResourcesController closeBlankImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[MCResourcesController closeBoxImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[MCResourcesController backImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[MCResourcesController forwardImage] in libMobclix_nonthumb.a(MCResourcesController.o) 
     +[MCResourcesController sharedResources] in libMobclix_nonthumb.a(MCResourcesController.o) 
     -[NSDictionary(MobclixHelper) stringForKeyPath:] in libMobclix_nonthumb.a(MobclixController.o) 
     -[NSDictionary(MobclixHelper) urlForKeyPath:] in libMobclix_nonthumb.a(MobclixController.o) 
     -[NSDictionary(MobclixHelper) integerForKeyPath:] in libMobclix_nonthumb.a(MobclixController.o) 
     -[NSDictionary(MobclixHelper) floatForKeyPath:] in libMobclix_nonthumb.a(MobclixController.o) 
     +[MobclixController sharedInstanceWithApplicationId:] in libMobclix_nonthumb.a(MobclixController.o) 
     +[NSCharacterSet(MCNSCharacterSet_Extensions) mcLinebreaksCharacterSet] in libMobclix_nonthumb.a(MobclixController.o) 
     +[MCSession currentSession] in libMobclix_nonthumb.a(MCSession.o) 
     -[MCConfig loadConfiguration:] in libMobclix_nonthumb.a(MCConfig.o) 
     +[MCConfig currentConfig] in libMobclix_nonthumb.a(MCConfig.o) 
     +[MCEnvironment platformName] in libMobclix_nonthumb.a(MCEnvironment.o) 
     +[MCEGOHTTPRequest _requestsLock] in libMobclix_nonthumb.a(MCEGOHTTPRequest.o) 
     +[MCEGOHTTPRequest currentRequests] in libMobclix_nonthumb.a(MCEGOHTTPRequest.o) 
     -[MobclixAdEvents initWithEvents:] in libMobclix_nonthumb.a(MobclixAdEvents.o) 
     +[MobclixInstrumentation currentInstrumentation] in libMobclix_nonthumb.a(MobclixInstrumentation.o) 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 

據我瞭解,問題是,Mobclix的庫使用C++(特別是C++的例外),而在MonoTouch的/ MonoDevelop的鏈接步驟不與C鏈接++標準庫,或者啓用C++異常。我不明白爲什麼這隻發生在爲模擬器構建時,或者爲什麼在我更新MonoTouch和iOS SDK之前沒有發生。

任何人都知道如何解決這個問題?

我已經嘗試在我的-gcc_flags中添加-fexceptions和-lstdC++,但它根本沒有幫助。

回答

0

新的MonoTouch Alpha 2有一個新的「Extra Arguments」標誌,「-cxx」會強制鏈接到g ++。試試看。

+1

這沒有幫助不幸。我可以看到它在鏈接時使用了g ++,但我得到了相同的錯誤消息(未定義符號「__Unwind_Resume」)。我設法通過將-lgcc_eh添加到gcc_flags來解決該問題。如果我使用-cxx或者不使用,那並不重要。這也適用於穩定版本的MonoTouch。 – Haakon 2011-03-19 14:11:28

相關問題