开发者

Monotouch app unable to link with Mobclix SDK using iOS SDK 4.3

开发者 https://www.devze.com 2023-02-18 04:29 出处:网络
I use Mobclix for ads in my app and I\'ve created mono bindings using btouch that I\'ve been using successfully for a while. I\'ve also added extra GCC flags to my project in order to link to the Mobc

I use Mobclix for ads in my app and I've created mono bindings using btouch that I've been using successfully for a while. I've also added extra GCC flags to my project in order to link to the Mobclix .a library.

Unfortunately, after updating to iOS SDK 4.3, MonoTouch 3.2.5 and MonoDevelop 2.4.2, I'm no longer able to link my application when building for the iOS simulator. I get the following error message:

/Developer/Platforms/iPhoneSimulator.pl开发者_开发技巧atform/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

As I understand it, the problem is that the Mobclix library uses C++ (notably C++ exceptions), while the linker step in MonoTouch/MonoDevelop does not link with the C++ standard library, or enable C++ exceptions. I don't understand why this only occurs when building for the simulator, or why it didn't happen before I updated MonoTouch and the iOS SDK.

Anyone know how to fix this?

I've tried adding -fexceptions and -lstdc++ to my -gcc_flags, but it didn't help at all.


The new MonoTouch Alpha 2 has a new "Extra Arguments" flag, "-cxx" which will force linking with g++. Try that.

0

精彩评论

暂无评论...
验证码 换一张
取 消