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

Home » Public Forums » archive » CALL_EXTERNAL in Linux Fedore Core2???
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
CALL_EXTERNAL in Linux Fedore Core2??? [message #40933] Tue, 07 September 2004 18:57
umesh is currently offline  umesh
Messages: 3
Registered: September 2004
Junior Member
Hi!

I am trying to call a simple C program (test.c) from a IDL program using
CALL_EXTERNAL. The C program is,

#include <stdio.h>

#include <math.h>

#include"/usr/local/rsi/idl_6.0/external/include/idl_export.h "

float Scale;
int test(int argc, char *argv[])

{

Scale = *(float *) argv[0];


Scale = pow(Scale, 5);

return(1);

}


IDL program is

PRO test

sc = 5.0
xx=CALL_EXTERNAL('/home/upadiga/work/IDLwork/test', $
'/home/upadiga/work/IDLwork/test', $
sc)

print, sc
end

In directory /home/upadiga/work/IDLwork/test

I have followed following compilation and linking procedures!!

> gcc -c -fPIC test.c
> ld -shared -o test.so test.o

Then in the IDL command line,

IDL>.r test
IDL>test

I get the following error message.

% CALL_EXTERNAL: Error loading sharable executable.
Symbol: /home/upadiga/work/IDLwork/test, File =
/home/upadiga/work/IDLwork/test
/home/upadiga/work/IDLwork/test: cannot open shared
object file: No such file or
directory
% Execution halted at: TEST 4
/home/upadiga/work/IDLwork/test.pro
% $MAIN$


Experts out there, could you please tell me how should I compile and link
the shared library!? I am using IDL6.0 on Linux (Fedora Core2 64bit OS).

Thanks a lot

umesh
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL and 64bit Linux
Next Topic: Re: event_pro for compound widgets

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

Current Time: Fri Oct 10 13:25:39 PDT 2025

Total time taken to generate the page: 1.68099 seconds