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

James Fitzsimons james.fitzsimons@gmail.com
Sun, 13 Feb 2005 22:23:39 +0000

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

Hi Peter,

On Sun, 2005-02-13 at 18:27, Peter Dennis Bartok wrote:
> > So, it appears you are right and the problem is with gmodule? So, I
> > guess the next question is do you know how I can fix this?
> In the message a few posts back you listed ncurses in /lib64:
> > james@athos 07-pinvoke $ file -k /lib64/libncurses.so.5.4
> > /lib64/libncurses.so.5.4: ELF 64-bit LSB shared object, AMD x86-64,
> > version 1 (SYSV), stripped
> The faillure is reported on a version in /usr/lib, though.
This is true, but I had thought this wouldn't be the problem as /usr/lib
is a symlink to /lib64. However...

> See if specifying the path to the 64 bit version when doing g_module_open=
> will let you open it.
I tired this just out of interest changing the c test program to look like =
#include <gmodule.h>

int main()
        GModule *mod;
        mod =3D g_module_open("/lib64/libncurses.so.5.4",
        if (mod =3D=3D NULL)
                printf("error: %s\n", g_module_error ());
                printf("ok: %p\n", mod);
        return 0;

now the output:
james@athos src $ ./a.out=20
ok: 0x5022e0

Wow! It works. Ok, now I am really confused. I'm not really sure how
this works, and I also have no idea as to how to apply this to fix my
mono problem.

Thanks very much for all your help and patience so far guys!
It's 5.50 a.m.... Do you know where your stack pointer is ?

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.6 (GNU/Linux)