CALL_EXTERNAL ERROR [message #28837] |
Tue, 15 January 2002 08:11  |
guenhwyvar
Messages: 4 Registered: October 2001
|
Junior Member |
|
|
Hello,
I've tried to run some C code under IDL, using CALL_EXTERNAL function.
Following the instuctions of idl manual I've built my shared library:
cc -I my-idl-path/external -c -Kpic mylib.c
cc -G -o mylib.so mylib.c
When I've tried to run my code I get some strange errors:
IDL> temp = call_external('mylib.so', 'myfunc')
% CALL_EXTERNAL: Error loading sharable executable.
Symbol: myfunc, File = mylib.so
ld.so.1:
/opt/rsi/idl_5.4/bin/bin.solaris2.sparc64/idl:
fatal: /export/home/users/belletti/lib/mylib.so:
wrong
ELF class: ELFCLASS32
% Execution halted at: $MAIN$
I've decided to make my library with gcc:
gcc -Imy-idl-path/external -c -f PIC mylib.c
gcc -shared -o mylib.so mylib.c
with the same bad results.
I run idl 5.4 on a Sun Ultra450 machine with Solaris 2.7.
The same procedure on a Pentium III machine with Mandrake Linux 8.1
and idl 5.5 works perfectly.
There's a problem in the library-making process o this is an idl
limit?
I wasn't able to find any information on idl documentation and over
the Net.
Maybe I should try to force the construction of a "simple" ELF binary?
Thanks,
Francesco Belletti
|
|
|