comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problems compiling shared libraries
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problems compiling shared libraries [message #47743] Thu, 02 March 2006 10:20 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
John,
try specifying the full path to the .so library. If you still get the error,
there might be another .so library referenced in your code that cannot be
found.

Haje


<johnpeterkelly@gmail.com> wrote in message
news:1141314955.878153.85280@e56g2000cwe.googlegroups.com...
> I'm having a consistent problem compiling shared libraries for use with
> the call_external() command. I've tried using the make_dll function as
> well as compiling the code manually with cc or gcc. Here's what I do:
>
> in idl:
> make_dll, 'tester', 'simple_return'
>
> Where tester.c is the name of my file, and simple_return is the name of
> a function that just returns a number.
>
> or at the command prompt:
> cc -c -fPIC tester.c
> cc -shared tester.o -o tester.so
>
> When I try in IDL:
> x = call_external('tester.so', 'simple_return')
>
> I get:
> % CALL_EXTERNAL: Error loading sharable executable.
> Symbol: simple_return, File = tester.so
> tester.so: cannot open shared object file: No such
> file or directory
>
> It would seem IDL can't find the .so file. What really confuses me is
> that I have another library file that I downloaded to run some LAPACK
> routines on older version of IDL (note: not compiled on my computer)
> which is sitting the same directory as tester.so. When I run:
>
> x = call_external('liblidl.so', 'c_eigen_all', matrix, 3l, e_vec,e_val)
>
> It works fine. This leads me to the conclusion that it's not that it
> can't find the file, but rather it doesn't recognize it as a library.
> If it helps, I'm running IDL 6.2 and my machine has a 64 bit processor
> (this has led to some completely different problems, but it might be
> relevant).
>
> Thanks in advance for your help.
>
> --John
>
Re: Problems compiling shared libraries [message #47748 is a reply to message #47743] Thu, 02 March 2006 08:26 Go to previous messageGo to next message
johnpeterkelly@gmail. is currently offline  johnpeterkelly@gmail.
Messages: 6
Registered: March 2006
Junior Member
Just as a note, I just did the exact same thing with the same code on
an older machine in IDL5.3 and it worked perfectly.

--John
Re: Problems compiling shared libraries [message #47842 is a reply to message #47743] Thu, 02 March 2006 10:40 Go to previous message
johnpeterkelly@gmail. is currently offline  johnpeterkelly@gmail.
Messages: 6
Registered: March 2006
Junior Member
I've pretty much figured out that path issues are not the problem. I
wrote the code and compiled it with the cc commands above on an older
machine. Then I copied the tester.so file over to my current machine
and put it in the library directory. The command in IDL 6.2 worked and
it printed out the correct value.

It seems the problem has been narrowed down to performing the compile
step on this computer.

Does anyone have any ideas?

--John

Also, here is the contents of tester.c:

int simple_return(){

return 5;

}
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help in Image Analysis
Next Topic: Re: Displaying equations in ps output

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:35:48 PDT 2025

Total time taken to generate the page: 0.00554 seconds