Re: Call_External and the C Math Library [message #6444 is a reply to message #6313] |
Mon, 10 June 1996 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
cavanaug@uars1.acd.ucar.edu (Charles Cavanaugh) wrote:
> Has anyone experienced problems getting IDL's call_external to behave
> when called on C code that uses the standard C math library? I have
> some C routines that use pow and sqrt, and when call_external was
> dumping core, I tracked the problem down to the lines that contained C
> math library calls. Math.h is included in the C code, and -lm is on
> the link line. I tried using an explicit interface in the C code
> (ie. double sqrt (double);), but that didn't help. Has anyone seen
> this before and found a fix?
I have used CALL_EXTERNAL() to call C routines using functions from
the standard C math library without any problems. We are using
Sun SPARCstations (2,10,20) under Solaris 2.3 and 2.5, and I have
used both Sun's SparcCompiler 3.0 and gcc 2.7.1 . I know that the
C routines have used SQRT(), MODFF(), FABS() to name a few.
Hope this helps to track it down.
Dave Foster
UCSD Brain Image Analyis Lab
foster@bial1.ucsd.edu
|
|
|