Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4349: Autolinking against debug STLport
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-24 17:15:27
#4349: Autolinking against debug STLport
--------------------------------------+-------------------------------------
Reporter: eckhardt@⦠| Owner: johnmaddock
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: config
Version: Boost Development Trunk | Severity: Problem
Resolution: invalid | Keywords:
--------------------------------------+-------------------------------------
Changes (by johnmaddock):
* status: new => closed
* resolution: => invalid
Comment:
Unfortunately your patch would break a lot of other things, and in general
this is actually unfixable.
Assuming you built with something like:
bjam stdlib=stlport runtime-debugging=off
Then you do indeed get libraries with a -dp suffix. Note however that
these would have been built with the /MD compiler option and linked
against stlport-5.2.lib and not against the debug libraries
(stlportd-5.2.lib) which would require building with /MDd - this latter
option is simply not supported by Boost.Build as far as I can see, which
is why the auto-linking code gives the error message it does.
Now here's the issue - the libraries built with a -dp suffix can only be
safely used if your code is also built with /MD and does not define _DEBUG
(since the latter is used by MS to indicate the /MDd compiler option). In
other words there is no way to select the "correct" -dp libraries in this
case, although it will select a different -p variant without debugging
info that is binary compatible with /MD.
To get the error message that you did, I assume that you built your code
with /MDd which will produce an error - and quite right too - as there is
no way for Boost.Build to create those binaries (/MDd without
_STLP_DEBUG). Further, building with /MDd and linking against -dp
binaries is actually dangerous, as you're linking code built with two
different MSVC runtimes, and two different STLport binaries.
Anyway, I hope I've got that all correct - this is fiendishly complex to
figure out which is why we created auto_link.hpp in the first place!
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4349#comment:1> 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:03 UTC