Re: CALL_EXTERNAL and C++ code [message #45045] |
Tue, 02 August 2005 16:25  |
Robert Barnett
Messages: 70 Registered: May 2004
|
Member |
|
|
If only IDL could bind using that wonderous GCC-XML thing.
On Tue, 02 Aug 2005 14:07:27 -0400
Mathieu Malaterre <mathieu.malaterre@kitware.com> wrote:
> Ok and the easy solution is to build you C++ library but then define the
> entry point with a C function:
>
> extern "C"
> int IDL_STDCALL watershed( int argc, void* argv[] )
>
> Sorry for the noise -again- :)
> Mathieu
>
> Mathieu Malaterre wrote:
>> Sorry, I forgot to mention the compile lines:
>>
>> $ c++ -o wtd_lg.o -I/usr/local/rsi/idl_6.1 -c wtd_lg.cpp
>> $ c++ -shared -o lib3D_wtd.so wtd_lg.o
>> $ c++ --version c++ (GCC) 3.3.5 (Debian
>> 1:3.3.5-13)
>>
>>
>> Mathieu
>>
>> Mathieu Malaterre wrote:
>>
>>> Hello,
>>>
>>> I am trying to get an idl application that used to work on win32
>>> to work on my linux (debian) box. Unfortunately I am getting:
>>>
>>> % XMANAGER: Caught unexpected error from client application. Message
>>> follows...
>>> % CALL_EXTERNAL: Error loading sharable executable.
>>> Symbol: watershed, File =
>>> /home/mathieu/Projects/FarSight/bin/bin/lib3D_wtd.so
>>>
>>> /usr/local/rsi/idl_6.1/bin/bin.linux.x86/libidl.so.6.1: undefined
>>> symbol: watershed
>>> % Execution halted at: WTDSEG 3207
>>> /home/mathieu/Projects/FarSight/FarSight.pro
>>> % GUI_EVENT 8550
>>> /home/mathieu/Projects/FarSight/FarSight.pro
>>> % XMANAGER_EVLOOP_STANDARD 478
>>> /usr/local/rsi/idl_6.1/lib/xmanager.pro
>>> % XMANAGER 708
>>> /usr/local/rsi/idl_6.1/lib/xmanager.pro
>>> % FARSIGHT 9253
>>> /home/mathieu/Projects/FarSight/FarSight.pro
>>> % $MAIN$
>>>
>>>
>>> If I checked for the symbol:
>>> $ nm /home/mathieu/Projects/FarSight/bin/bin/lib3D_wtd.so | c++filt|
>>> grep watershed
>>> 0000519c T watershed(int, void**)
>>>
>>>
>>> I am reading in parallel the document: External Development Guide
>>> (edg.pdf), but there is no mention of problem *before* calling the
>>> function.
>>>
>>> Does anyone knows what compile flags to use and which compiler to use
>>> on linux, and if I can use shared lib ? I could not find much in the
>>> newsgroup except:
>>>
>>> http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/57d81859e3d3a502/191ac3c2f11d2bb8
>>>
>>>
>>> But again this refer to C not C++ which has a completely different
>>> name mangling...
>>>
>>>
>>> Thanks for your help,
>>> Mathieu
--
nrb@ Robbie Barnett
imag Research Assistant
wsahs Nuclear Medicine & Ultrasound
nsw Westmead Hospital
gov Sydney Australia
au +61 2 9845 7223
|
|
|