|
Boost : |
Subject: Re: [boost] [all] Request for out of the box visibility support
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-08-18 20:17:22
On Sat, Aug 18, 2018 at 10:54 PM Robert Ramey via Boost
<boost_at_[hidden]> wrote:
>
> On 8/18/18 10:26 AM, Andrey Semashev via Boost wrote:
> > So, for example, if you mark a type with
> > default visibility and define it in a static library, you can link that
> > library into a shared library and the type would still be
> > default-visible*. This is useful when you want to ensure that a certain
> > type, like an exception, is public regardless of how it is compiled into
> > the final executable.
>
> Hmmm - don't you run into problems linking static libraries into shared
> libraries.
There is no problem linking static libraries into shared libraries, I
do it every day.
> I'm pretty sure that this is a problem on VC compilers a
> there are different versions of C runtime - one for dynamic linking and
> another for static linking. It's all very confusing to me.
MSVC issues with its runtime incompatibilities are fairly specific to
MSVC. And those issues are not related to static libraries per se
since the same problems can occur with shared libraries. Basically,
you should always link with the shared runtime, unless you dead sure
know what you're doing and really have to link with the static one.
I'm not even sure they still ship the static runtime.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk