[Mono-list] P/Invoke on amd64 was :Marshalling problems

James Fitzsimons james.fitzsimons@gmail.com
Sat, 12 Feb 2005 13:48:00 +0000


--=-LzSeqVfpKhERBDhXRlNS
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi all,
so I just tried this from within a 32bit chroot and it works. It seems
that P/Invoke doesn't work on 64bit mono at the moment?

Does anyone know when this might be planned for?

Cheers,
James

On Sat, 2005-02-12 at 13:07, James Fitzsimons wrote:
> Hi all,
>=20
> I am trying to use Marshalling for the first time on Mono and the
> runtime doesn't seem to be able to find my C library.
>=20
> I know the library (libhighgui) exists because I can find it like so:
> james@athos src $ ls /usr/local/lib/libhigh*
> /usr/local/lib/libhighgui-0.9.so.5      /usr/local/lib/libhighgui.la
> /usr/local/lib/libhighgui-0.9.so.5.0.0  /usr/local/lib/libhighgui.so
> james@athos src $=20
>=20
> My ld_library_path seems to be correct
> james@athos src $ echo $LD_LIBRARY_PATH
> :/usr/local/wine20030813/lib:/usr/lib64/evolution/1.4:/usr/lib64/evolutio=
n/1.4:/usr/local/lib
>=20
> My C# code looks like this:
> // Highgui stuff=09
> [DllImport("highgui")]
> private static extern System.IntPtr cvLoadImage(string filename, int
> iscolor);=20
>=20
> But when I run my app I get the following error:
> james@athos src $ mono CvImage.exe=20
> CvImage test application
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
>=20
> Unhandled Exception: System.DllNotFoundException: highgui
> in <0x000bf> (wrapper managed-to-native) Slam.CvImage:cvLoadImage
> (string,int)
> in <0x00068> Slam.CvImage:.ctor (string,bool)
> in <0x00069> Slam.MainClass:Main (string[])
>=20
> james@athos src $=20
>=20
> I am using mono version 1.1.3 on an amd64 platform.
>=20
> Anybody have any ideas?
>=20
> Cheers,
> James
--=20
It's 5.50 a.m.... Do you know where your stack pointer is ?

--=-LzSeqVfpKhERBDhXRlNS
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)

iD8DBQBCDgkQtf4qL6AoafMRAgJaAKCKy+1fJwrf6Tt67z5EZrmFDAWDRgCdF0jx
pvP0QDa6+9BeZJXVPY9GyDk=
=Ufi9
-----END PGP SIGNATURE-----

--=-LzSeqVfpKhERBDhXRlNS--