[Mono-list] P/Invoke on amd64

James Fitzsimons james.fitzsimons@gmail.com
Mon, 14 Feb 2005 21:55:25 +0000


--=-Hbsgldb6GVkAG+t0RJ7V
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi all,
Ok I have the first part of my challenge solved.

On Sun, 2005-02-13 at 22:23, James Fitzsimons wrote:
> > See if specifying the path to the 64 bit version when doing g_module_op=
en=20
> > will let you open it.
> I tired this just out of interest changing the c test program to look lik=
e this:
> #include <gmodule.h>
>=20
> int main()
> {
>         GModule *mod;
>         mod =3D g_module_open("/lib64/libncurses.so.5.4",
> G_MODULE_BIND_LAZY);
>         if (mod =3D=3D NULL)
>                 printf("error: %s\n", g_module_error ());
>         else
>                 printf("ok: %p\n", mod);
>         return 0;
> }
>=20
> now the output:
> james@athos src $ ./a.out=20
> ok: 0x5022e0
Once I got put onto the whole gmodule thing by Peter I thought well why
not try reinstalling gmodule? After rebuilding/installing gmodule the
Curses example now works! Yay ;)=20
All I can think is it was something to do with glib not liking being
compiled with gcc 3.4.3, as this time I rebuilt it using gcc 3.3.4 and
all is good.

However now that I am (reasonably) sure that P/Invoke is working
correctly I still can't use my target library libopencv.so. When trying
to load it I get the following errors:
Mono-INFO: DllImport loading: 'libopencv'.
Mono-INFO: DllImport error loading library '/usr/local/lib/libopencv.so:
undefined symbol: __gxx_personality_v0'.

(CvImage.exe:8000): Mono-WARNING **: DllImport unable to load library
'/usr/local/lib/libopencv.so: undefined symbol: __gxx_personality_v0'.

Unhandled Exception: System.DllNotFoundException: opencv

Now, I am aware that this has something to do with libstdc++, and I
definately have that installed, but I don't know what to try next.

Any clues would be greatly appreciated.
Cheers,
James

--=20
It's 5.50 a.m.... Do you know where your stack pointer is ?

--=-Hbsgldb6GVkAG+t0RJ7V
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)

iD8DBQBCER5Ntf4qL6AoafMRAnSdAKD4Kap3PM5jt9c0ZU0xy39uRzo59wCgvcer
0sPckppR5PYP7OUqmgSa1B8=
=r4YX
-----END PGP SIGNATURE-----

--=-Hbsgldb6GVkAG+t0RJ7V--