[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using C++ DLM's With IDL?
K. Banerjee wrote:
> Nigel Wade <firstname.lastname@example.org> wrote:
>>K. Banerjee wrote:
>>>I need to call some outside code from IDL. I created a
>>>shared object file, using a C++ compiler (g++). When I call
>>>a function from the DLM from the IDL command prompt, I get
>>>Symbol not found: cerr
>>>(There are other symbols not found.)
>>>Is it possible to use C++ shared objects for DLM's ?
>>>(I have to use some classes for my routine.)
>>You don't say what platform you are using, but I'll hazzard a guess that
>>Did you use g++ to link the DLM? It's generally a wise thing to use the
>>same tool to create a shared object as you use to compile the source.
>>You could try linking the DLM with g++, or adding the the relevent c++
>>library to the link command - cerr is in one of the libraries called
>>/usr/lib/libstdc++..., the particular one depends on what version of g++
>>and libc you are using.
> Yes, I am using g++ on Linux. Do you know off hand how to link
> with a shared object library? (libstdc++... is a shared object).
> K. Banerjee
-l<library_name>, in this case <library_name> is stdc++<whatever>. I
don't know which stdc++ library you'll need; I have 5 in my /usr/lib and
I haven't a clue what each is for.
a shared object is just a library as far as the linker is concerned.
If you use g++ I would have thought that g++ would add the correct
library to the link command for you, though. Is there a reason you
prefer to use ld rather than g++?
If you really want to use ld, try using g++ first with the -v option so
it lists each command it executes. That should show you which libraries
it uses for the ld command.
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : email@example.com
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555