[Mono-dev] Interrop native lib

Rafael Teixeira monoman at gmail.com
Wed Sep 8 08:27:47 EDT 2010


Please see http://www.mono-project.com/DllNotFoundException

<http://www.mono-project.com/DllNotFoundException>Hope it helps,

Rafael "Monoman" Teixeira
---------------------------------------
"We live in a world operated by science and technology. We have also
arranged things so that almost no one understands science and technology.
This is a prescription for disaster. We might get away with it for a while,
but sooner or later this combustible mixture of ignorance and power is going
to blow up in our faces."
-Carl Sagan


On Tue, Sep 7, 2010 at 7:52 PM, olivier dufour <olivier.duff at gmail.com>wrote:

> Hello,
>
> I try to create my own extension for banshee but I have an issue
>
> My project contain 2 project files: 1 c++ project with a native lib and a
> managed part for extension and glue with banshee.
>
> All my code is here : http://github.com/dufoli/banshee
>
> All work yesterday, and today, I do not know why but I get a
> DllNotFoundException :
> liblastfmfpBridge.so whereas this lib is in the same folder.
>
> my config file contain :
> <configuration>
>   <dllmap dll="liblastfmfpBridge.dll" target="liblastfmfpBridge.so"
> os="!windows,osx"/>
>   <dllmap dll="liblastfmfpBridge.dll" target="liblastfmfpBridge.dylib"
> os="osx"/>
> </configuration>
>
> and I declare cpp function like that:
>         [DllImport("liblastfmfpBridge.dll")]
>         static extern IntPtr Lastfmfp_initialize (int rate, int seconds,
> int winsize, string artist, string album, string title, int tracknum, int
> year, string genre);
>
> but when I call initalize, I get a DllNotFoundException
> : liblastfmfpBridge.so
> whereas lib is in folder. And liblastfmBridge.so use liblastfmfp.so which
> is copy to the bin folder too.
> I have try to add both .so in /usr or in ld_config path but it change
> nothing....
>
>
> I follow the documentation but find nothing in
> http://www.mono-project.com/Interop_with_Native_Libraries.
> Thanks for any help...
>
> Olivier Dufour
>
> _______________________________________________
> 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/20100908/345a14d4/attachment.html 


More information about the Mono-devel-list mailing list