[Mono-list] Can't get a simple shared object to be used - DllNotFoundException

Ian Norton inorton at gmail.com
Wed Jul 31 06:49:01 UTC 2013

Here we go, I was on my nexus yesterday so couldnt easily grab these:



On 31 July 2013 03:33, Jonathan Pryor <jonpryor at vt.edu> wrote:

> On Jul 30, 2013, at 5:34 PM, Stifu <stifu at free.fr> wrote:
> > I've never done that myself, but if I remember correctly, you're not
> supposed to add the ".so" part. Just do [DllImport("libshared")].
> Close; you should prefer [DllImport("shared")], with one exception. On
> Windows, this will try to load SHARED.DLL, on Linux it will load
> libshared.so, and on OS X it will load libshared.dylib.
> The exception is that if the library name contains a '.', Windows
> LoadLibrary() will not automatically append a .DLL extension, so this would
> always fail:
>         [DllImport("gtksharp-2.0")]
> In these cases, you should use the full Windows filename, and provide a
> .dll.config file so that the file can be found on other platforms:
>         [DllImport("libgtksharp-2.0.dll")]
> - Jon
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130731/a21e0f56/attachment.html>

More information about the Mono-list mailing list