.lib C routines in IDL [message #55283] |
Wed, 08 August 2007 01:42  |
Patrizia
Messages: 1 Registered: August 2007
|
Junior Member |
|
|
Hi,
I'm trying to include some .lib files written in C in IDL.
I tryed to include them using the CALL_EXTERNAL command of IDL but it
doesn't work.
Could someone give me some advices? Do I have to convert first
the .lib files?
Thanks,
Patrizia
|
|
|
Re: .lib C routines in IDL [message #55302 is a reply to message #55283] |
Thu, 16 August 2007 01:57  |
sc.bugger
Messages: 2 Registered: August 2007
|
Junior Member |
|
|
Hello Patrizia
You first have to create a shared library. Under *nix, that will look
like this:
# gcc -fPIC -shared -o libmylibrary.so myCcode.c
Then, you'll be able to call some functions in yor .so library from
IDL, e.g.:
IDL> result = call_external('path_to_the_library.so','function_name',
p1,p2,p3, ... ,/f_value)
A shorter and better answer is: browse attentively in your IDL Help
for 'call_external' or concretise your concern.
Vlad
|
|
|