Bug 3620 - monotouch-bindings facebook.dll reference causes compilation linker issue
Summary: monotouch-bindings facebook.dll reference causes compilation linker issue
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2012-02-23 17:51 UTC by Al Nyveldt
Modified: 2012-02-24 13:26 UTC (History)
2 users (show)

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


Attachments
Test project (414.91 KB, application/zip)
2012-02-23 17:56 UTC, Al Nyveldt
Details


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:
Status:
VERIFIED FIXED

Description Al Nyveldt 2012-02-23 17:51:46 UTC
Create new empty monotouch solution.
Add reference to Facebook.dll
Switch to Release\iPhone
Build All

    mtouch exited with code 1

Go into project options, iPhone Build
Set Linker Options to: Don't Link
Build

    Works fine, but app is over 50mb

MonoDevelop 2.8.6.5
Mono 2.10.8
MonoTouch 5.2.5

TestProject attached.

Sorry of this is the wrong place to put this bug report.
Comment 1 Al Nyveldt 2012-02-23 17:56:58 UTC
Created attachment 1414 [details]
Test project
Comment 2 Sebastien Pouliot 2012-02-23 20:43:41 UTC
it's the right place for such report. thanks for taking the time to do so!

When you get errors like this one you can get additional details, inside MonoDevelop, by clicking on the "Build Output" (in the Error List pad). That will give you the full building process that leads to the error.

In this case it seems there's a missing framework (coregraphics) that cause the error. That likely was not found because most applications will be using MonoTouch.CoreGraphics (and that will link the framework). However for a very small app (like an empty solution) this is not the case.

The solution is to add manually the following options:

--gcc_flags "-framework coregraphics"

in the "additional mtouch arguments" in the "iPhone Build" of your "Project Options". You'll need to do this for both Debug, Release configuration.

Let me know if you have issue. In the mean time I'll look at having this fixed properly in the facebook bindings library.
Comment 3 Jeffrey Stedfast 2012-02-24 11:15:06 UTC
Fixed in github
Comment 4 Al Nyveldt 2012-02-24 13:26:09 UTC
Thanks guys.  

Just pulled the latest and gave it a try.

It works great now.