Project no longer builds since recent MonoTouch update

dermotosdermotos USMember

I have a project I haven't touched in a while. I went to update it for iOS7 today, and it wont build.
Further investigation indicates it's a problem with my binding for CocoaLibSpotify. The binding project itself builds ok, but when I try to use it in my main app project, I get linking errors like below:

Undefined symbols for architecture armv7:
"std::terminate()", referenced from:
l578 in libCocoaLibSpotify.a(libspotify.o)
l609 in libCocoaLibSpotify.a(libspotify.o)
l752 in libCocoaLibSpotify.a(libspotify.o)
l757 in libCocoaLibSpotify.a(libspotify.o)
l761 in libCocoaLibSpotify.a(libspotify.o)
l765 in libCocoaLibSpotify.a(libspotify.o)
l815 in libCocoaLibSpotify.a(libspotify.o)
"operator delete[](void*)", referenced from:
l652 in libCocoaLibSpotify.a(libspotify.o)
"operator delete(void*)", referenced from:
l633 in libCocoaLibSpotify.a(libspotify.o)
l642 in libCocoaLibSpotify.a(libspotify.o)
l652 in libCocoaLibSpotify.a(libspotify.o)


I've googled this, and most results suggest I ensure I set

in my bindings. This is already the case.

My linkwith.cs file:

[assembly: LinkWith ("libCocoaLibSpotify.a", LinkTarget.ArmV7 | LinkTarget.ArmV7s,  ForceLoad = true, IsCxx=true, Frameworks = "QuartzCore CoreGraphics SystemConfiguration CFNetwork CoreAudio AudioToolbox AVFoundation Security")]

(I added in the LinkTarget.ArmV7s , but it hasn't made any difference).

This was all working about 3 months ago, so something in a recent MonoTouch release has caused this problem to surface.
Any ideas?!


  • nodoidnodoid GBMember, Beta ✭✭✭

    Which version of MT are you using and is it stable/beta/alpha? A hell of a lot has changed in 3 months and it's possible you've hit a problem (such as PCL or something like that)

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    @dermotos - did you get this fixed? I'm having similar problems.

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Do you have any additional mtouch arguments in the project's iOS Build options?

  • dermotosdermotos USMember

    Hi James,
    Yes, I manage to sort it by putting

    -cxx -gcc_flags "-lstdc++"

    as my MonoTouch build arguments in my main projects options. These weren't needed before, but adding them in resolved the problem.

    I'm guessing the functions such as "operator delete(void*)" etc.. are located in that c++ library.

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    Hi Dermot,
    Thanks - that matches with the info I've just been given by Xamarin support as below.

    Apparently there's a (new?) bug which doesn't transfer the IsCxx=true to the command line, therefore adding the -cxx to the arguments solves the problem.

Sign In or Register to comment.