Re: xxx already defined in lib, ignoring second definition
Paul Forgey <paulf <at> metainfo.com>
2004-02-17 01:01:50 GMT
SMP. Currently, there's no good way to distribute builds around an NT
environment. Maybe with gcc, and as soon as the x86 optimizations get
better. Unfortunately, msvc currently produces faster code.
Effectively, the same rules apply for either SMP or distributed builds
since they both involve multiple processes working on the same project.
There are two basic problems with msvc's default behavior that gets in
the way of SMP builds. Writing debug info to a common database file,
and automatic pre-compiled headers.
For debug builds, use -Z7 -Yd to put the debug information into the
object files (then into the dll or exe). A separate .pdb file still
gets generated at link time. So far, I haven't noticed any difference
in debugging behavior doing things this way vs. the way dev studio
projects want do it by default.
As for pre-compiled headers, generate them ahead of time with one
source file that simply includes what you want in your pch (like
stdafx.cpp for vc generated mfc projects) with -Yc and use -Yu with the
rest of your files to use it. Set up the dependencies properly to
avoid race conditions between the processes. You can use -Fp to place
the precompiled header data in $(LOCATE_TARGET).
On Feb 13, 2004, at 12:11 AM, Alen Ladavac wrote:
> From: "Paul Forgey" <paulf <at> metainfo.com>
>> Add it to the very long list of stupid MS behaviors in their tools.
>> (You should see the tricks I had to do just to get parallel builds
>> working properly)
> Do you use the parallel build on an SMP machine, or across different
> machines? I'm interested in making this work, on MS as well.
> jamming mailing list - jamming <at> perforce.com