Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6644: Windows: auto_link.hpp incorrectly errors with "Mixing a dll boost library with a static runtime is a really bad idea..."
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-07 09:19:28
#6644: Windows: auto_link.hpp incorrectly errors with "Mixing a dll boost library
with a static runtime is a really bad idea..."
---------------------------------+------------------------------------------
Reporter: noloader@⦠| Owner: johnmaddock
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: config
Version: Boost 1.48.0 | Severity: Problem
Resolution: worksforme | Keywords: Windows auto_link /MT /MD DLL
---------------------------------+------------------------------------------
Comment (by anonymous):
Using your command line and the test program I posted above the output
message I see is:
{{{Linking to lib file: libboost_regex-vc100-mt-sgd-1_49.lib}}}
which is the static regex lib as expected/required.
As Steven has correctly pointed out (my bad) BOOST_DYN_LINK is an internal
macro set just before including the auto-link machinery. For regex it is
only set if BOOST_REGEX_DYN_LINK or BOOST_ALL_DYN_LINK are defined: these
are user settable macros, we don't set them.
Try adding:
{{{
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_REGEX_DYN_LINK)
#error "Oops"
#endif
}}}
Right before you include boost.regex in your code, my guess is the error
will be triggered, and then you just have to figure out where those
defines are coming from.
HTH, John.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6644#comment:9> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC