[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using C++ DLM's With IDL?



Nigel Wade <nmw@ion.le.ac.uk> writes:
> > 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).
> > 
> > Thanks.
> > 
> > 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++?
> 

Hi Nigel and K.--

I suspect that the C++ runtime system must be initialized before you
can run a C++ module.  I am not sure how this is done, and probably it
is rather system dependent.  The problem is that IDL is not a C++
program, so this C++ initialization never occurs.  I am not sure
whether it is or is not possible to do this at dynamic load time.  Or
if, such initialization happens automatically with dynamic loading.

An acceptable alternative may be to have your C++ module be a separate
program, and communicate with IDL using pipes (ie, SPAWN, ...,
UNIT=unit).

Good luck,
Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------