Subject: [Boost-bugs] [Boost C++ Libraries] #6695: config/auto_link.hpp #errors unnecessarily errors when mixing /RTC and release CRTs
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-16 18:42:34
#6695: config/auto_link.hpp #errors unnecessarily errors when mixing /RTC and
release CRTs
------------------------------------------+---------------------------------
Reporter: Ben Craig <ben.craig@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: Boost 1.50.0 | Component: config
Version: Boost 1.46.1 | Severity: Problem
Keywords: |
------------------------------------------+---------------------------------
config/auto_link.hpp has the following code:
#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
# pragma message("Using the /RTC option without specifying a debug
runtime will lead to linker errors")
# pragma message("Hint: go to the code generation options and switch to
one of the debugging runtimes")
# error "Incompatible build options"
#endif
This prevents builds that would otherwise succeed. The attached program
uses the program_options and system libraries. If I remove these checks,
I can build, link, and run it with the following invocations of Visual
Studio 2003's cl.exe and link.exe, with no warnings or errors:
cl.exe /c /Foauto_link_test.obj /W3 /GR /GX /Od /MD /RTC1 /DDEBUG /I<boost
include path> auto_link_test.cpp
link.exe /subsystem:console /LIBPATH:<boost lib path>
/OUT:auto_link_test.exe auto_link_test.obj
When the flags are present, I hit the previously mentioned #error.
In my company's local version of boost 1.46.1, I have removed this check
with no issues. We build the boost libraries and our code with Visual
Studio 2003 (i386), Visual Studio 2005 (i386 and x64), Visual Studio 2008
(i386 and x64) and Visual Studio 2010 (i386 and x64).
My proposed fix is to remove these checks entirely. If there are specific
libraries that genuinely won't work with /RTC and a debug runtime, then
this check could be moved to those library headers.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6695> 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