Boost logo

Boost-Build :

From: Zbynek Winkler (zwin_at_[hidden])
Date: 2003-05-07 04:33:16


Vladimir Prus wrote:

>Zbynek Winkler wrote:
>
>
>>The <link-runtime> feature
>>can be set to "shared" which finaly gave me the /MD in the command line.
>>Too bad that it is giving me /MD even for debug build (instead of /MDd).
>>
>>
>
>As I see from msvc.jam, there's <runtime-debugging> option which is separate
>from regular debuggind option. When <runtime-debugging> is on you'll get
>/MDd. Do you think /MDd should be present for ordinary debug builds?
>
Yes. The difference between these two (according to the MSDN) is
/MD Multithreaded DLL Defines *_MT* and *_DLL* so that both
multithread- and DLL-specific versions of the run-time routines are
selected from the standard .H files. This option also causes the
compiler to place the library name MSVCRT.LIB into the .OBJ file.
Applications compiled with this option are statically linked to
MSVCRT.LIB. This library provides a layer of code that allows the linker
to resolve external references. The actual working code is contained in
MSVCRT.DLL, which must be available at run time to applications linked
with MSVCRT.LIB.

/MDd Debug Multithreaded DLL Defines *_DEBUG*, *_MT*, and *_DLL* so
that debug multithread- and DLL-specific versions of the run-time
routines are selected from the standard .H files. It also causes the
compiler to place the library name MSVCRTD.LIB into the .OBJ file.

When looking at the windows headers they make use of the _DEBUG define
and replace some c-lib function with their debugging counterparts (they
say that the debug version of the runtime makes some additional checks).
And also default configurations in new project in MSVC use this for
debug build so I think it would be good to be consistent with it (I
would say that it is something that would a developer previously using
MSVC IDE expect - at least I did :)).

Zbynek

-- 
<zwin at robotika.cz>
http://zw.matfyz.cz/ http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk