Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost's automatic selection of debug vs release libaries on link - how to disable?
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-02-15 02:45:50


Damien Hocking wrote:

> Hello everyone,
>
> I've noticed that when linking Boost libraries, the linker implicitly knows whether it requires a
> debug or a release Boost library, and what the full name of the library is. E.g. on Windows the
> linker wants "boost_serialization-vc80-mt-d-1_37.lib" in debug and
> "boost_serialization-vc80-mt-1_37.lib" in release.
>
> I'm working in an SCons build system where SCons runs the show and the Boost libraries will be
> custom-renamed and the linker told specifically what libraries to link. Is there any way to
> disable this implicit naming feature in the bjam build step through a compiler option?

        - There's no "bjam build step", the official build system used by C++ Boost is called Boost.Build
        - The autolink behaviour is not controlled by Boost.Build, it is controlled by MS-specific #pragmas
        that occur (indirectly) in the headers of affected libraries
        - You can disable autolink by defining BOOST_ALL_NO_LIB macro when building the application that
        uses C++ Boost libraries.

- Volodya


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