Bug 98 - MonoTouch doesn't detect linkage of C++ binaries
Summary: MonoTouch doesn't detect linkage of C++ binaries
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 4.x
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-07-28 13:00 UTC by Rodrigo Kumpera
Modified: 2012-03-09 10:08 UTC (History)
5 users (show)

Tags: MonoTouch C++
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rodrigo Kumpera 2011-07-28 13:00:00 UTC
By default we use the C linker with MonoTouch, which breaks apps that link C++ code.

All the user gets as a feedback is an error of unresolved symbol __ResumeUnwind.

MD should expose a build option to use the C++ linker to solve this.
Additionally, it should properly detect such cases and give the user some decent feedback - it might be easily done with some mtouch help, so keep us in the loop.
Comment 1 Mikayla Hutchinson [MSFT] 2011-07-28 14:04:48 UTC
mtouch bug, it's not MD's job to poke around inside native binaries or interpret error messages from inside mtouch. mtouch should provide decent error messages in a form that MD can consistently parse and display to the user directly.

Re. the option, just put -cxx inside the "mtouch extra args", i.e. with the gcc args arg.
Comment 2 Rodrigo Kumpera 2011-07-28 14:51:51 UTC

I'm fine with mtouch doing all error detection, it's probably the saner place to do it. MD would still need to provide an appropriate response to the user.

For this end MD parsing the resulting text output is quite fragile. If it consumed some sort of structured result things would be much easier for both of us.

Given I don't have much experience on this subject, what would be the best way/format for mtouch to send this to MD.

And please don't tell me to simply dump this as text as it's both fragile and a bucket of FAIL for the user.
Comment 3 Jeffrey Stedfast 2011-11-10 15:22:15 UTC
So... the LinkWith attribute solves this (at least so long as the user uses a properly LinkWith'd .dll).

Is that good enough?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2012-03-09 10:08:33 UTC
I think we've solved this one with the LinkWith attribute.