[Mono-dev] DllImport on Mac

Daniel Lo Nigro lists at dan.cx
Mon Oct 20 00:45:42 UTC 2014


DllImport("clamav") should still work. Try running your app with
the MONO_LOG_LEVEL=debug environment variable set and see which paths it's
trying to load the library from:

MONO_LOG_LEVEL=debug mono yourapp.exe

Since your library is 64-bit (as it's in /usr/lib/x86_64/), ensure you are
running a 64-bit version of Mono. You need to either run a 64-bit Mono or
compile a 32-bit version of libclamav.

On Sun, Oct 19, 2014 at 5:13 PM, Brandon Perry <bperry.volatile at gmail.com>
wrote:

> I have a set of C# bindings I have written for the ClamAV project which
> work on Windows and Linux by simply DllImport("clamav").
>
> On mac, libclamav.6.dylib gets installed into
> /usr/lib/x86_64/libclamav.6.dylib
>
> I cannot for the life of my figure out how to reference this library on
> mac for a DllImport. I have tried an absolute path as well as every
> permutation of the library name as possible since DllImport will auto
> detect the extension.
>
> Any thoughts on referencing a dylib with DllImport? Thanks!
>
> --
> http://volatile-minds.blogspot.com -- blog
> http://www.volatileminds.net -- website
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20141019/06a387df/attachment.html>


More information about the Mono-devel-list mailing list