[Mono-devel-list] How to use shared library with C# on linux
Daniel Schalk
daniel at schalk.de
Wed Nov 19 14:27:42 EST 2003
Thanks for the fast answers so far...
@Chris
>There's your problem: giving it a .cc extension makes it C++ code, so
>when you compile it with GCC the function name will be mangled unlike
>with C.
I changed the file to *.c and compiled it again. Same error.
@Peter
>I think the problem in this case is that the runtime doesn't have a
>mapping set up to find the library; you're going to need to edit
>/etc/mono/config and add a <dllmap> entry. (As far as I know, there's no
>way to extend this scheme, which seems like it could be a big problem
>for third-party apps to me).
I don't know exactly what to configure whithin this file...but I added the
following line:
<dllmap dll="libtest.so" target="libtest.so" />
What does this entry mean? Do I have to edit/move/add the libtest.so file
anywhere else?
Currently, the .exe and the libtest.so are placed in the same directory
(/usr/tmp).
Doesn't work either...Same error.
Dan
More information about the Mono-devel-list
mailing list