Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-10-03 15:06:40


--- In boost_at_y..., "Michael MacDonald" <michaelm_at_a...> wrote:
> Does anyone know the equivalent information for Linux or Solaris?
>
> I would think that you would face the same restrictions (at least).
>

I do not have complete understanding of all the details
under Linux, but at least I was able to make an experiment.

Observe that Linux does not have "export libraries"
because all symbols are exported.
OTOH there is the concept of "sonames"
to be able to have different versions of the same library
on one system.

See e.g. http://www.mv.com/ipusers/vanzandt/lib.html
for details.

In my small experimental program I found the following:

To be able to do a dynamic cast from a B* to a (derived) C*
it is necessary to have the virtual function table from
B available. In particular,
either libB must be linked or all virtual functions have to
be inline.
This is very reasonable since dynamic casts
are defined only for classes with virtual functions,
so without knowing the details one can assume that
dynamic cast is implemented using the vtbl.

In contrast to that was Jim Hyslop said about Windows, however,
B might have nonvirtual noninline functions
and static data members -
as long as they are not referenced explicitely,
it will not be necessary to link libB.

Helmut


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk