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..."

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-02 13:30:35


#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
---------------------------------+------------------------------------------
Changes (by johnmaddock):

  * status: new => closed
  * resolution: => worksforme

Comment:

 I suspect you have BOOST_DYN_LINK defined somewhere in your project
 settings (or those inherited by your project which can be hard to track
 down). Take a look at the command line tab in the IDE to see what's set.

 For me I have:

 {{{
 /I"M:\data\boost\trunk" /ZI /nologo /W3 /WX- /Od /Oy- /D "WIN32" /D
 "_DEBUG" /D "_CONSOLE" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t
 /Zc:forScope /Yu"StdAfx.h" /Fp"Debug\dll_test.pch" /Fa"Debug\" /Fo"Debug\"
 /Fd"Debug\vc100.pdb" /Gd /analyze- /errorReport:queue
 }}}

 And building the following as a DLL:

 {{{

 #include "stdafx.h"

 #define BOOST_LIB_DIAGNOSTIC
 #include <boost/regex.hpp>


 void f()
 {
    boost::regex e("abc");
 }
 }}}

 Builds just fine and links to: libboost_regex-vc100-mt-sgd-1_49.lib.

 If you have a self contained test case (including the IDE project files)
 that reproduces please reopen, but please check the actual command line
 passed to the compiler first.... Oh and double check that
 boost/config/user.hpp hasn't been modified.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6644#comment:5>
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