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

Duane Wandless duane at wandless.net
Wed Oct 1 09:14:39 EDT 2008

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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20081001/6e889338/attachment.html 

More information about the Mono-osx mailing list