Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_CONTRACT_DYN_LINK

BOOST_CONTRACT_DYN_LINK — Define this macro to compile this library as a shared library (recommended).

Synopsis

// In header: <boost/contract/core/config.hpp>

BOOST_CONTRACT_DYN_LINK

Description

If this macro is defined, this library is compiled so it can be linked as a shared library (a.k.a., Dynamically Linked Library or DLL) to user code. This library will automatically define this macro when Boost libraries are built as shared libraries (e.g., defining BOOST_ALL_DYN_LINK or using bjam link=shared ...).

[Warning] Warning

In general this library will correctly check contracts at run-time only when compiled as a shared library, unless user code checks contracts in a single program unit (e.g., a single program with only statically linked libraries). Therefore, it is recommended to build and use this library as a shared library by defining this macro (or equivalently by building all Boost libraries as shared libraries).

See Also:

Getting Started


PrevUpHomeNext