IDL call_external to sprlib ? [message #3900] |
Thu, 30 March 1995 00:00 |
zweimuel
Messages: 1 Registered: March 1995
|
Junior Member |
|
|
I would like to include a C-library into a IDL-program via the call_external
function. The sprlib is a library which does a lot of classification tasks,
which I need and I would like to visualize the results in IDL.
Now to the problem:
I compiled the library (sprlib.a) and made a shared library with
"ld -shared -all sprlib.a -o sprlib-so". Then I wrote a little C-program,
which calls the desired function of the sprlib and is itself called from IDL
with call_external.
IDL can find all functions and starts the sprlib. So far no problem. When I
want to read a dataset, the program crashes with a segmentation fault and
core dumped, but only if the dataset has more than about 5 samples. With a
little dataset everything works fine and the program ends properly.
When I call my little testprogram from another C-program without IDL, it can
load all datasets without any problem.
As far as I could trace the problem the routine crashes within sprlib when
it gets memory for a vector (malloc_sample()).
I use IDL Version 3.6.1a (IRIX mipseb) and the newest sprlib on a
SGI IRIS Indigo.
My questions:
Has anybody successfully included sprlib into IDL?
Are there any limitations to the call_external function? (I could
allocate MB's of memory without any problem)
How can I find the source of the problem, how to debug ?
Which problems did you have with call_external and C ?
Any help is welcome.
BTW, I have read the docs in .../misc/dynamic_link and chapter 18 of the
user-documentation.
Hoping for help, Charly
--
Internet: | Zweimueller Karl | Packet-Radio:
zweimuel@icg.tu-graz.ac.at | Graz,Austria | OE5KZN@DB0LNA.DEU.EU
|
|
|