Re: CALL_EXTERNAL PROFESSIONAL HELP [message #19528] |
Thu, 06 April 2000 00:00 |
mikef
Messages: 9 Registered: May 1998
|
Junior Member |
|
|
Then the cause was the name mangling that C++ performs on the function.
If you need to use C++, then you must either use the mangled name or
compile the interface function as C and delare it as:
extern "C" {
[type] emfit_xy_array([parameters]);
}
In article <38EB4EA1.2ED12D97@va.aetc.com>,
Bernard Puc <bpuc@va.aetc.com> wrote:
> Let me reply to my own message...The problem lies somewhere in the
> compile. I was able to make things work by changing the source code
> file extensions from *.cc to *.c. Apparently the c++ compiler was begin
> used instead of the gcc compiler.
>
> Bernard Puc wrote:
>>
>> Hello,
>>
>> I'd appreciate any ideas from you folks on the possible causes of the
>> following error message. I'm compiling a shareable object on linux and
>> I get the following error message when I try to use it. I've
>> successfully compiled other C routines into shareable objects for IDL
>> and thought I knew what I was doing. Now I believe it was just luck.
>>
>> % CALL_EXTERNAL: Error loading sharable executable.
>> Symbol: emfit_xy_array, File =
>> /home/bpuc/C_code/emfit/betafit.linux.so
>> /home/bpuc/C_code/emfit/betafit.linux.so: undefined
>> symbol:
>> emfit_xy_array
>
> --
> Bernard Puc AETC, INC.
> bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
> (703) 413-0500 Arlington, VA 22202
--
--
Mike Fitzgibbon MRFitz@ns.arizona.edu
UofAz, LPL phone:(520)626-4791
Systems Programmer, Sr. fax: (520)621-6783
|
|
|
Re: CALL_EXTERNAL PROFESSIONAL HELP [message #19539 is a reply to message #19528] |
Wed, 05 April 2000 00:00  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Bernard,
try an underscore (_) before or after the routine name in the call_external
statement.
Greetings,
Haje
Bernard Puc wrote:
> Hello,
>
> I'd appreciate any ideas from you folks on the possible causes of the
> following error message. I'm compiling a shareable object on linux and
> I get the following error message when I try to use it. I've
> successfully compiled other C routines into shareable objects for IDL
> and thought I knew what I was doing. Now I believe it was just luck.
>
> % CALL_EXTERNAL: Error loading sharable executable.
> Symbol: emfit_xy_array, File =
> /home/bpuc/C_code/emfit/betafit.linux.so
> /home/bpuc/C_code/emfit/betafit.linux.so: undefined
> symbol:
> emfit_xy_array
>
> The name of the function in the source code is "int emfit_xy_array(int
> argc, void *argv)"
>
> --
> Bernard Puc AETC, INC.
> bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
> (703) 413-0500 Arlington, VA 22202
--
------------------------------------------------------------ ----------------
Haje Korth
Space and Atmospheric Sciences (NIS-1)
MS D466
Los Alamos National Laboratory
Los Alamos, NM 87545
Phone: (505) 667-0788
FAX: (505) 665-7395
e-mail: hkorth@lanl.gov
------------------------------------------------------------ ----------------
|
|
|
Re: CALL_EXTERNAL PROFESSIONAL HELP [message #19542 is a reply to message #19539] |
Wed, 05 April 2000 00:00  |
Bernard Puc
Messages: 65 Registered: January 1998
|
Member |
|
|
Let me reply to my own message...The problem lies somewhere in the
compile. I was able to make things work by changing the source code
file extensions from *.cc to *.c. Apparently the c++ compiler was begin
used instead of the gcc compiler.
Bernard Puc wrote:
>
> Hello,
>
> I'd appreciate any ideas from you folks on the possible causes of the
> following error message. I'm compiling a shareable object on linux and
> I get the following error message when I try to use it. I've
> successfully compiled other C routines into shareable objects for IDL
> and thought I knew what I was doing. Now I believe it was just luck.
>
> % CALL_EXTERNAL: Error loading sharable executable.
> Symbol: emfit_xy_array, File =
> /home/bpuc/C_code/emfit/betafit.linux.so
> /home/bpuc/C_code/emfit/betafit.linux.so: undefined
> symbol:
> emfit_xy_array
--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
|
|
|