[Mono-osx] Not require Mono install for a DLL

David Rivera mithril at me.com
Wed Oct 1 16:45:38 EDT 2008

 Monobjc provides the ability to compile a Cocoa app with the required mono frameworks embedded within it so that it does not require mono to be installed on the system to run it. It is implemented as a couple Nant tasks. I'm not sure if it will work for you or not, but you might look into it, its what I use.


-David Rivera

On Wednesday, October 01, 2008, at 08:14AM, "Duane Wandless" <duane at wandless.net> wrote:
>I am trying to create a DLL that does not require mono to be installed.  I
>have used mkbundle with this command line:
>mkbundle -o host.c --nomain -c -oo libhost.a -L <path to mono libraries>
>MacMonoClient.dll System.dll System.Core.dll etc.
>I can successfully compile and link the host.c file and the libhost.a object
>file into a Cocoa Objc application.  At runtime I can use
>mono_domain_assembly_open() to load the 'bundled' library.  And it works.
>However, if I move the Mono.framework out of the way and run the application
>I get this error:
>dyld: Library not loaded: /Library/Frameworks/Mono.
>  Referenced from: /Users/username/MySrc/mycode/sandbox/My
>Desktop/build/Debug/My Desktop.app/Contents/MacOS/My Desktop
>  Reason: image not found
>Now of course I'd like to do all of the relocation magic on the dylib's etc
>so that I do not need Mono installed.  I have had no success in this
>effort.  The result of mkbundle is not a file that otool can find symbols.
>install_name_tool appears to do nothing.
>So the basic question is: can I fully embed a mono library so that it is not
>required to have mono installed?  And if yes... then what am I doing wrong?
>Thanks for any help!

More information about the Mono-osx mailing list