[Mono-osx] bmac and dylib question

Raymond Reggers raymond at adaptiv.nl
Mon Feb 6 21:30:07 UTC 2012


Ok I followed your advice on copying the dylib in the app bundle. Still no luck. I then found this:

http://cocoa-mono.org/archives/254/growl-my-monomac-application-says/

This helpfull blog post gave me some insights on how to include and load the growl framework. Downloaded the sample code, and the growl framework. It worked perfectly.

However I still can't get my own test project to work. So I created another test project (which i've also included in the google docs link below):

- It includes an Xcode project named "MyFramework" which produces MyFramework.framework
- A MonoMac MonoDevelop project named "MyApp".
- A .cs file and .dll file under Bindings. I've created these bindings by running:

mono bmac.exe -e <path to MyFrameworkBindings.cs> -r System.Drawing

- Referenced the resulting .dll in "MyApp"
- Build the MyFramework framework, and manually copied it into the bundle MyApp/Contents/Frameworks/
- Run it

Every time I get exactly the same error report when running it. 

Test project can be found here:

https://docs.google.com/open?id=0B5djRR5X2R3EOGY4MDY5M2ItMmY2My00ZGRiLWI5NjQtOWQ1OGY5MzhmYTky

I must either be doing something very stupid or I didn't quite understood the binding process. Anyways, thank you very much if anyone would be willing to have a look! 

Raymond

Op Feb 6, 2012, om 6:56 PM heeft Michael Hutchinson het volgende geschreven:

> On 6 February 2012 10:51, Raymond Reggers <raymond at adaptiv.nl> wrote:
>> I guess this is most likely caused because my dylib is not referenced? But
>> how should I include this dylib in my MonoMac project?
> 
> MonoTouch projects don't yet have support for copying dylibs into the
> app bundle. I would suggest adding a postbuild steps that runs a cp
> command to do this.
> 
>> I've tried using "Add native reference" in my MonoMac project. But this
>> doesn't seem to work. I also read about including gcc_flags like this for
>> example:
>> 
>> -gcc_flags "-L${ProjectDir} -lMylibrary -force_load -lSystemLibrary
>> -framework CFNetwork -ObjC"
>> 
>> Where should I add these in my MonoDevelop / MonoMac project?
> 
> You don't, gcc_flags only applies to MonoTouch.
> 
> 
> -- 
> Michael Hutchinson
> http://mjhutchinson.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20120206/8532fadf/attachment.html>


More information about the Mono-osx mailing list