|
Boost : |
From: Beman Dawes (beman_at_[hidden])
Date: 2000-06-20 09:38:59
At 04:47 PM 6/19/2000 +0100, Lois Goldthwaite wrote:
>>
>> 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.
Changed. That also eliminated some incomprehensible warning messages.
Thanks.
>> 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.
Yes, and I tentatively confirmed that works for lots of other compilers
too.
I have given up on the bash shell and moved to Python. MUCH easier to
write. MUCH easier to debug. MUCH more readable code. MUCH easier to get
exactly the results desired rather than an approximation. MUCH easier to
use. Have got the script working for more compilers, too. Will post
results soon.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk