Hi Jonathan, Michal,

On Sat, 2005-02-12 at 22:52, Jonathan Pryor wrote:
The question becomes whether or not your programs are 32-bit or 64-bit
> programs, and ditto for your library.
> 
> Running "file" and "ldd" on your programs and your libraries would help.
Ok, firstly running file and ldd on the Curses program example in my
last email:
 [EMAIL PROTECTED] 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

[EMAIL PROTECTED] 07-pinvoke $ file -k Curses.exe
Curses.exe: MS Windows PE 32-bit Intel 80386 console executable\012-
MS-DOS executable (EXE), OS/2 or MS Windows

[EMAIL PROTECTED] 07-pinvoke $ file /usr/local/bin/mono
/usr/local/bin/mono: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), not
stripped

Now for the actual libraries I am trying to use in my real program:
[EMAIL PROTECTED] 07-pinvoke $ file -k /usr/local/lib/libhighgui-0.9.so.5.0.0 
/usr/local/lib/libhighgui-0.9.so.5.0.0: ELF 64-bit LSB shared object,
AMD x86-64, version 1 (SYSV), not stripped

[EMAIL PROTECTED] 07-pinvoke $ file -k /usr/local/lib/libopencv-0.9.so.5.0.0  
/usr/local/lib/libopencv-0.9.so.5.0.0: ELF 64-bit LSB shared object, AMD
x86-64, version 1 (SYSV), not stripped

(this is a C program which uses the above libraries just fine)
[EMAIL PROTECTED] objRec $ file -k objectRecognition
objectRecognition: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not
stripped

Finally, you should try running mono with MONO_LOG_LEVEL=info and
> MONO_lOG_MASK=dll.
When I try to run the curses example with logging on I get the following:
Mono-INFO: DllImport loading: 'libncurses'.
Mono-INFO: DllImport error loading library '/usr/lib/libncurses.so:
invalid ELF header'.

(Curses.exe:10129): Mono-WARNING **: DllImport unable to load library
'/usr/lib/libncurses.so: invalid ELF header'.

And with my open computer vision program:
Mono-INFO: DllImport loading: 'libopencv'.
Mono-INFO: DllImport error loading library '/usr/local/lib/libopencv.so:
undefined symbol: __gxx_personality_v0'.

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

So, it looks like mono finds the libncurses library, but can't load it
for some reason, like wise with the opencv library. The error message is
a bit miss leading in this case. I still don't know how to fix the
problem though.


On Sun, 2005-02-13 at 01:03, Michal Moskal wrote:
> The example works for me without any problems, some other info:
Ok this is strange...I wonder what is different between your environment
and mine that it doesn't work on mine?

> [EMAIL PROTECTED] 07-pinvoke]$ ldd =mono
>         libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0
> (0x0000002a9566c000)
>         libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0
> (0x0000002a95770000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x0000002a95874000)
>         libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x0000002a95977000)
>         libnsl.so.1 => /lib64/libnsl.so.1 (0x0000002a95afc000)
>         libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a95c13000)
>         libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95d28000)
>         librt.so.1 => /lib64/tls/librt.so.1 (0x0000002a95eac000)
>         libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95fb6000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
[EMAIL PROTECTED] 07-pinvoke $ ldd /usr/local/bin/mono
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0
(0x0000002a9566c000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0
(0x0000002a95770000)
        libdl.so.2 => /lib/libdl.so.2 (0x0000002a9589b000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
(0x0000002a9599e000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x0000002a95b22000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0000002a95c39000)
        libm.so.6 => /lib/libm.so.6 (0x0000002a95dce000)
        librt.so.1 => /lib/librt.so.1 (0x0000002a95f54000)
        libc.so.6 => /lib/libc.so.6 (0x0000002a9606e000)
        /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
[EMAIL PROTECTED] 07-pinvoke $
(remember on my system /lib, and /usr/lib) are symlinked to /lib64)

> [EMAIL PROTECTED] 07-pinvoke]$ mono --version
> Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
> Contributors. www.go-mono.com
>         TLS:           __thread
>         GC:            Included Boehm (with typed GC)
>         SIGSEGV      : normal
>         Globalization: none
[EMAIL PROTECTED] 07-pinvoke $ mono --version
Mono JIT compiler version 1.1.4.20050210, (C) 2002-2004 Novell, Inc and
Contributors. www.go-mono.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV      : normal
        Globalization: none

> [EMAIL PROTECTED] 07-pinvoke]$ uname -a
> Linux roke 2.6.10-0.96 #1 Sun Jan 9 06:11:03 CET 2005 x86_64 0 unknown PLD 
> Linux
[EMAIL PROTECTED] 07-pinvoke $ uname -a
Linux athos 2.6.9-gentoo-r14 #8 Sun Jan 30 08:53:55 UTC 2005 x86_64 AMD
Athlon(tm) 64 Processor 3400+ AuthenticAMD GNU/Linux

Thanks very much for your patience guys and thanks for any help you can
provide!

Cheers,
James
-- 
It's 5.50 a.m.... Do you know where your stack pointer is ?

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to