[Mono-list] P/Invoke on amd64 was :Marshalling problems
Sat, 12 Feb 2005 22:04:54 +0000
Content-Type: multipart/mixed; boundary="=-OpE61l0MD/YJ2hJPrXrv"
On Sat, 2005-02-12 at 16:47, Jonathan Pryor wrote:
> > libhighgui.so is located in /usr/local/lib. This should be fine however
> > as according to this http://www.jprl.com/interop.html#library-linux if
> > your target library is in /etc/ld.so.cache P/Invoke should find it.
> I know what it says; I wrote it. =20
Sorry, my bad. I didn't catch that when I wrote my reply!
> I also know that I have virtually zero
> knowledge or experience with mixed 64-bit/32-bit platforms, which
> Linux/Amd64 is. Consequently, my guide is somewhat lacking, if only
> because I don't know everything. :-)
Fair enough, I can't blame you for that ;-) To be honest, I haven't notice=
difference at all between my 64 linux environment and my 32 bit enviroment.=
things are still in the same place and work exactly as they did under a
> I have heard that there are /lib64 directories that are searched for 64-
> bit libraries, but that's about it. Not having an AMD64 platform of my
> own, it's hard to test for anything else.
There is a /lib64 directory, but on my system there is a symlink from /lib =
/lib64 so it looks just like a normal 32 bit system.
> So as an experiment, try writing a C program which uses that library,
> and compile/link with the 64-bit GCC (whatever that may be named), and
> run your C program. If this fails, which I suspect it will, you will
> know why Mono can't find your library. :-)
Actually I have written a bunch of C programs which compile, link and run a=
that library just fine so unfortunately that doesn't help us much.
> Then, you can tell us what it takes to find the library, I can update my
> guide, and everyone can be happy. :-)
I wish I could. Actually as an example the little program (one of the examp=
Mono - A developers Notebook ) I have attached runs fine in my 32 bit
chroot but not under 64 bit. Both installations are using Mono 1.1.4=20
built from the daily release a couple of days ago. On my 32 bit chroot
libncurses.so lives in /lib. In my 64 bit install it lives in /lib64
(which has a /lib symlink).
It's 5.50 a.m.... Do you know where your stack pointer is ?
Content-Disposition: attachment; filename=Curses.cs
Content-Type: text/x-csharp; name=Curses.cs; charset=ANSI_X3.4-1968
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-----END PGP SIGNATURE-----