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

Geoff Norton gnorton at novell.com
Wed Oct 1 17:00:44 EDT 2008


Duane,

  man mkbundle.  Specifically look at the --static option.

-g

On Wed, 2008-10-01 at 09:14 -0400, Duane Wandless 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.
> framework/Versions/1.9.1/lib/libintl.8.0.1.dylib
>   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!
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx



More information about the Mono-osx mailing list