[MonoDevelop] Newbie question: Making a reference to a linux shared library
Petit Eric
surfzoid at gmail.com
Mon Oct 6 08:45:40 EDT 2008
2008/10/6 Andy Selvig <ajselvig at gmail.com>:
> On Mon, Oct 6, 2008 at 6:41 AM, Petit Eric <surfzoid at gmail.com> wrote:
>> 2008/10/6 alanb <alan.battersby at ntlworld.com>:
>>>
>>> I tried P/Invoke, I created a shared library, wrapped it in C# class and it
>>> all compiles ok. But when I try to execute one of the external functions I
>>> get an exception - System.DllNotFoundException: libtest.so . As this is an
>>> experiment I do not want to place my library in /usr , /lib etc so I tried
>>> setting LD_LIBRARY_PATH in a shell but that doesnt seem to work for me. I am
>>> assuming that I need to set LD_LIBRARY_PATH in the shell created by
>>> monodevelops run command, so can someone tell me how to do this?
>
> Alan-
>
> You can also simply copy the the library to the bin directory of your
> application. This can be done MonoDevelop with a post-build event.
> Native libraries can't be added as references, only the assembly that
> wraps it.
You can add the lib, by right click on the project, add existing file,
then made a right click on the click file and select :"copy to output
dir", in last MD version it is in Quick property menu, but i forget in
oldest MD version.
This will copy it in your output dir
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
--
Cordially.
Small Eric Quotations of the days:
---------------------------------------------------------------------------
If one day one reproaches you that your work is not a work of
professional, say you that:
Amateurs built the arch of Noah, and professionals the Titanic.
---------------------------------------------------------------------------
Few people are done for independence, it is the privilege of the powerful ones.
---------------------------------------------------------------------------
No key was wounded during the drafting of this message.
More information about the Monodevelop-list
mailing list