[Mono-list] DDllImport .config file does not work

David Abrames abramesd at kmbs.konicaminolta.us
Wed Sep 20 10:02:31 EDT 2006

Dear Jon,

Thank you for your reply.  I ran my program as you suggested and the output
I am getting shows how mono is trying to find the shared object by mangling
the original library name.  For example it adds '.so' to the end and 'lib'
to the beginning and then tries about a dozen various combinations of this.
However none of these match the actual shared object name.

There is no indication that mono detected or did not detect the .config file
which contains the dllmap command.  Is there a method for displaying the
.config files mono is loading/reading?

David Abrames

> -----Original Message-----
> From: Jonathan Pryor [mailto:jonpryor at vt.edu]
> Sent: Tuesday, September 19, 2006 9:34 PM
> To: abramesd at kmbs.konicaminolta.us
> Cc: mono-list at lists.ximian.com
> Subject: Re: [Mono-list] DDllImport .config file does not work
> On Tue, 2006-09-19 at 16:26 -0400, David Abrames wrote:
> > I have created a library that wraps an API that has a
> Windows.DLL and Linux
> > Shared Object. According to the "Interop with Native Libraries"
> I can use a
> > per-assembly .config file to map the Windows DLL name to the
> Linux Shared
> > Object name.  However I can't get it to work.
> >
> > When I run my application I get a Dll Not Found Exception on the Windows
> > DLL.  The name of my wrapper library is MyAPILib.dll and the
> .config file is
> > called MyAPILib.dll.config.
> Run your app with the MONO_LOG_LEVEL environment variable set to "info"
> and the MONO_LOG_MASK environment variable set to "dll", e.g.
> 	MONO_LOG_LEVEL=info MONO_LOG_MASK=dll mono --debug program.exe
> The output will contain many diagnostic messages specifying what
> libraries it's trying to load, and what errors (if any) mono is
> encountering when trying to load the library.
>  - Jon

More information about the Mono-list mailing list