Boost logo

Boost Users :

Subject: Re: [Boost-users] Linking problem
From: Lars Viklund (zao_at_[hidden])
Date: 2012-02-26 16:39:08


On Sun, Feb 26, 2012 at 12:28:59PM -0800, Robert Ramey wrote:
> Lars Viklund wrote:
> > Statically linking a library that uses a dynamic runtime is perfectly
> > sane.
>
> I guess I'm confused about building boost with
>
> link=static runtime-link=shared
>
> which I take to mean that the library is created as a DLL
> (runtime-link=shared) but linked as a static (link=static)
> which would include some functions in the CRT twice
> - once inside the DLL and again when the the library
> which uses the DLL refers to the same function.
> I'm guessing that boost build won't build a DLL
> with a static linked CRT for just this reason.
>
> I concede I'm confused about this.

The 'link' option is about the flavor of library, static or shared, that
your library itself is.

The 'runtime-link' option is about which flavor of C++ runtime, static
or dynamic, that is linked into the library/application you're building.

See [1] and [2] for the filename decorations caused by these options and
their verbatim meaning.

[1] http://www.boost.org/doc/libs/1_49_0/more/getting_started/windows.html#library-naming
[2] http://www.boost.org/doc/libs/1_49_0/more/getting_started/unix-variants.html#library-naming

-- 
Lars Viklund | zao_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net