Boost logo

Boost Users :

Subject: Re: [Boost-users] msvc linker wants to prepend "lib" to library names
From: Lars Viklund (zao_at_[hidden])
Date: 2012-02-02 15:48:29

On Thu, Feb 02, 2012 at 12:30:10PM -0700, Nathan Currier wrote:
> lib being added to the beginning of the library name represents linking
> dynamically. In MS Visual Studio, you can change between Static and Dynamic
> under Project / Properties / Configuration Properties / C/C++ / Code
> Generation / Runtime Library. A setting of MD or MDd is Dynamic and MT or
> MTd is Static, the appended 'd' representing debug capabilities. Try
> swapping between the two types to see if it fixes the linking problem.

Please do not top-post (as per guidelines).

Your post is dangerously incorrect. There are two very distinct concepts
at work here:
1) having a static or import+dynamic Boost library,
2) having a Boost library built against the static or dynamic C++

A lib- prefix on Windows implies that the Boost library is a static
library. The lack of the lib- prefix indicates that the library is an
import library and has an associated DLL file.

What you describe is what the -s- tag indicates, namely whether the C++
runtime library is statically or dynamically linked. The presence of -s-
means that the static runtime is used. The lack of it means that the
dynamic runtime is used.

For the sake of completeness, -gd- means that the Boost library is built
against the debug runtime (-g-) with debug code (-d), while their
omission means that the release runtime is used and that debug code is
not enabled.

Please see the Getting Started guide's reference for more exact details:

Lars Viklund | zao_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at