Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-26 12:13:42

I had a user e-mail me asking if Jam could produce PDB files. At
first I was surprised by this, since I thought Jam was producing the
PDB files. However, the only PDB being generated is the vc?0.pdb
file. Well, I've always relied on the IDE to set this stuff up for
me, so I didn't have a clue about how to specify things on the
command line and had to start doing some research. Here's a diff of
msvc-tools.jam that I did to generate the "project" PDB files:

C:\home\boost\tools\build>cvs diff
? jam_src/bin.ntx86
Index: msvc-tools.jam
RCS file: /cvsroot/boost/boost/tools/build/msvc-tools.jam,v
retrieving revision 1.20
diff -c -r1.20 msvc-tools.jam
*** msvc-tools.jam 17 Feb 2002 22:46:30 -0000 1.20
--- msvc-tools.jam 26 Feb 2002 17:01:26 -0000
*** 22,28 ****

  flags msvc CFLAGS <debug-symbols>on : /Zi ;
! flags msvc LINKFLAGS <debug-symbols>on : /DEBUG ;

  flags msvc CFLAGS <optimization>off : /Od ;
  flags msvc CFLAGS <optimization>speed : /O2 ;
--- 22,28 ----

  flags msvc CFLAGS <debug-symbols>on : /Zi ;
! flags msvc LINKFLAGS <debug-
symbols>on : /DEBUG /debugtype:cv /pdbtype:con ;

  flags msvc CFLAGS <optimization>off : /Od ;
  flags msvc CFLAGS <optimization>speed : /O2 ;

Now there are few issues left, and I don't have the knowledge to
address them.

Static link libraries aren't "executables" (well, niether are DLLs,
but in this case the linker treats DLLs as "executable") so a
<project>.pdb file is not generated. However, the vc?0.pdb file is
still generated, but is generated in the build directory (and thus
causes a name clash with other builds). I tried to research this and
have a few links that suggest for static libraries we should be using
the /Z7 switch. However, I honestly don't know if this is misguided
advice or not. Here are some links that describe this:

Another issue is whether or not the Jam rules should provide an
explicit way to set this stuff. The VC++ IDE generates PDB files by
default, and that's what most people are going to expect and want.
But there may be others that want a different form of debug
information, so simply turning it on for all debug builds like I did
may not be the correct solution.

Hopefully VC++ experts and Jam developers can help resolve these

Bill Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at