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

Home » Public Forums » archive » calling C++ from IDL - throwing exceptions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calling C++ from IDL [message #28043 is a reply to message #23688] Fri, 16 November 2001 01:26 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Juan I. Cicuendez wrote:

> Hi,
>
> I am writing you all to see if you could help me because I am
> trying to call C++ code from IDL (I am working in Sun solaris). We
> compile the C++ with CC with extern "C" and produced the .so and when
> we
> use call_external in IDL, it does not find the C++ template library
> which were used in my C++ classes. Is any way to tell IDL where to
> look for this library, or can this be done with make_dll (I don't know
> the compilation options). Could you help me somehow, maybe there are
> other ways, I am a bit desperate. Anyone know the compilation options
> if you want to compile with gcc.
>
> The compilation options I used were:
> CC -c -xarch=v9 otra.c
> CC -G -xarch=v9 otra.o -o libotra.so
>
> from IDL we do:
> S=call_external('libotra.so','mas')
>
>
> Thanks a lot,
>
> Juan Cicuendez

If the library is one of your own then you need to specifically link
against it by adding it to the DSO creation command (CC -G -lyour_lib).

Secondly, so that IDL will know where to look for it (if it's not on the
standard search path) you either need to set the LD_LIBRARY_PATH env
variable to the directory where the library is, or add a "runpath" to the
link command with -R option.

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Poor letters!
Next Topic: TS-WAVE 3.0 Release!

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

Current Time: Fri Oct 10 17:00:17 PDT 2025

Total time taken to generate the page: 0.24278 seconds