LINKIMAGE, SunOS 5.4, IDL 5.4 [message #32401] |
Thu, 03 October 2002 14:05 |
K Banerjee
Messages: 14 Registered: September 2001
|
Junior Member |
|
|
Folks,
I have written some C/C++ functions to be used by our IDL programs.
Under RedHat Linux, IDL 5.5a (as well as IDL 5.3), everything
works as expected. The IDL command LINKIMAGE is used to load each
of these external functions and procedures. However, under SunOS
5.4 (Sparc) and IDL 5.4, we get a segmentation fault when attempting to
load the first function. Our linkimage call is:
linkimage, 'idlvbio_simple_function', 'idlvbio.so', 1 , 'IDLVbio_Simple_Function', MAX_ARGS=0, MIN_ARGS=0
Here's the function (it simply returns 92):
extern "C" IDL_VPTR IDL_CDECL IDLVbio_Simple_Function(int argc,
IDL_VPTR argv[], char *argk)
{
return (IDL_GettmpLong(92));
}
In an appropriate header file, I have:
extern "C" IDL_VPTR IDL_CDECL IDLVbio_Simple_Function(int argc, IDL_VPTR argv[0], char *argk);
and an entry for this function in the array:
static VOXBO_IDL_DEF Vbio_functions[]
On the Sun box, we compile with gcc 2.95.3. After the segmentation
fault, I examined the generated core file with gdb. From what I can
tell (all the IDL libraries lacked symbolic info), the error occurred
in the fike ../../gcc-2.95.3/frame.c, line 627, which is:
case DW_CFA_set_loc:
Has anyone encountered this problem before? Has any had success with
LINKIMAGE on a Sun with gcc (we need to use gcc)?
I looked in the index of IDL's External Development Guide, but found
no relevant information. I searched the RSI TechTips, also to no avail.
Thanks.
K. Banerjee
|
|
|