I embed my app so your solution will most likely be different.  I call:

mono_config_parse ([configFile UTF8String]);

Where configFile contains the full path to my target libfoo.dylib.

You can also do this:
MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono MyProgram.exe

Which will give lots of debug output and help identify why it cannot find
the dll.

Hope this points you in the right direction.

On Tue, Feb 16, 2010 at 3:49 PM, anthony taranto

> Hello,
> I'm building an application using monobjc. This application has a dll
> that relies on a compiled c library (dylib). When running my
> application using the mono installation, I have a dll.config file with
> the following contents:
> <configuration>
>  <dllmap dll="foo" target="libfoo.dylib" />
> </configuration>
> This config file is placed in the same directory as my .exe and .dll
> files and i can run the application.
> When building a standalone application, I can't run it because it
> can't find libfoo.dylib. This seems to have something to do with
> relative paths. I notice that the mkappl nant task outputs that it is
> including and "relocating" the config file.
> My question is, what path can I supply to the target attribute to get
> my standalone application to load libfoo.dylib appropriately?
> Alternatively, how should I approach this problem?
> Thanks,
> --Anthony

Reply via email to