зеркало из https://github.com/mono/mail-archives.git
104 строки
3.3 KiB
HTML
104 строки
3.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-list] mono and shared libs
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:peter.bauwens%40pandora.be">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="016609.html">
|
|
<LINK REL="Next" HREF="016612.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-list] mono and shared libs
|
|
</H1>
|
|
<B>The Source
|
|
</B>
|
|
<A HREF="mailto:peter.bauwens%40pandora.be"
|
|
TITLE="[Mono-list] mono and shared libs">peter.bauwens@pandora.be
|
|
</A><BR>
|
|
<I>Tue, 28 Oct 2003 21:46:11 +0100</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="016609.html">[Mono-list] [Fwd: undefined symbol: g_get_application_name]
|
|
</A></li>
|
|
<LI> Next message: <A HREF="016612.html">[Mono-list] Gtk# 0.12 released
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#16611">[ date ]</a>
|
|
<a href="thread.html#16611">[ thread ]</a>
|
|
<a href="subject.html#16611">[ subject ]</a>
|
|
<a href="author.html#16611">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hi,
|
|
|
|
I'm rather new at using mono and i have some trouble using the DllImport
|
|
statement to link to shared libs.
|
|
|
|
After I got a sample from mono-doc containing the following lines
|
|
|
|
<codesnippet>
|
|
[DllImport("ncurses", EntryPoint="initscr")]
|
|
public extern static void initscr();
|
|
</codesnippet>
|
|
|
|
i tried to do the same to the zvt lib (libzvt.so) which resides in the
|
|
same place as the libncurses.so file does. When runnning my app however,
|
|
mono can find and use the libncurses file without any problem but keeps
|
|
on nagging about being unable to locate the libzvt.so file.
|
|
|
|
<codesnippet>
|
|
[DllImport("zvt", EntryPoint="zvt_term_new")]
|
|
public static extern IntPtr zvt_term_new();
|
|
</codesnippet>
|
|
|
|
Both shared libraries reside in the /usr/lib directory, why is mono
|
|
unable to find the latter if it has no problem with the first?
|
|
|
|
How do i fix this?
|
|
|
|
Thx in advance
|
|
|
|
PS.
|
|
|
|
1. I tried configuring the mapping of zvt to libzvt.so in the
|
|
/etc/mono/config file without any progress, mono always tries to find
|
|
the shared lib in ./ copying the lib to ./ seems to help for the shared
|
|
lib itself but then loading the libs it depends on fails
|
|
|
|
2. ldd results for both libs
|
|
|
|
# ldd libncurses.so
|
|
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
|
|
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
|
|
|
|
# ldd libzvt.so
|
|
libz.so.1 => /usr/lib/libz.so.1 (0x40027000)
|
|
libm.so.6 => /lib/tls/libm.so.6 (0x40035000)
|
|
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
|
|
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="016609.html">[Mono-list] [Fwd: undefined symbol: g_get_application_name]
|
|
</A></li>
|
|
<LI> Next message: <A HREF="016612.html">[Mono-list] Gtk# 0.12 released
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#16611">[ date ]</a>
|
|
<a href="thread.html#16611">[ thread ]</a>
|
|
<a href="subject.html#16611">[ subject ]</a>
|
|
<a href="author.html#16611">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|