Boost logo

Boost :

From: Lois Goldthwaite (loisg_at_[hidden])
Date: 2000-06-19 10:47:43


>
> What command line should be used to invoke the compiler? For example, for
> VC++ 6.0 I am using:
>
> cl /nologo /MLd /W3 /GR /GX /Zi /Od /I "\boost\site" /D "WIN32" /D "_DEBUG"
> /D "_MBCS" /D "_CONSOLE" $1$2
>

I suggest using /MD or /MDd rather than /MLd. For some programs it may not make
any difference, but for real applications /MD (use DLL run-time library) is the
only practical option. If you link against a static version of the run-time lib
with /ML or /MT, then the executable and each DLL has its own version of a
memory manager, and if you pass allocated memory across the boundaries (e.g.
returning a string by value), then the debug heap memory manager complains.
With /MD, all pieces share a common memory manager. There are ways to avoid the
problem, but it gets complicated. See article Q94248 in the MS knowledge base.

>
> Third question for each compiler is how do you tell if a compilation has
> errors? For VC++ I am grepping the output for "error" for lack of a better
> way.

Doesn't CL.EXE send back a return code if the compilation doesn't succeed? It
used to be possible to write batch files that checked for errorlevel, IIRC.

Cheers,
Lois


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk