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

Home » Public Forums » archive » IDL call_external to sprlib ?
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
IDL call_external to sprlib ? [message #3900] Thu, 30 March 1995 00:00
zweimuel is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Associate Consulting Engineer Position-Boulder, CO
Next Topic: stopping a PV-Wave batch file (v3.10 vs v 4.20)

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

Current Time: Wed Oct 08 15:38:01 PDT 2025

Total time taken to generate the page: 0.00546 seconds