Re: Exporting debugging symbols in a static .lib
On Nov 1, 2:59 pm, "Alex Blekhman" <tkfx.NOS...@yahoo.com> wrote:
"James Kanze" wrote:
What is the usual procedure for exporting debugging
information when delivering a static library (a .lib
It is no different from .EXE or .DLL file. You supply the
resulting .PDB file along with the project output.
Which causes what commands to be generated? I'm building from
the command line.
The only solution I've found to date is to copy all of the
.pdb files for the object files into the directory in which
I deliver the .lib, but this seems to defeat part of the
purpose of using a library. Is there any way of putting them
into the .lib itself, or of building a single .pdb for the
What you describe is strange. Usually you have one debug info
(program database) file name per project. It is defined in
project properties: C/C++ -> Output Files -> Program Database
File Name. Alternatively, you can use /Fd command line switch
with desired name.
Aha (perhaps)! Does this mean that if I compile the different
objects with the same program database file, they'll merge,
rather than the last one overwriting the previous one?
I'm currently specifying /Fd using the object file name, with
..obj replaced by .pdb. I'll try it using the library name, but
it will require significant work (since the make function which
compiles the code doesn't know the library name).
If you don't specify /Fd option (either via project settings
or manually), then the .PDB file name defaults to VCx0.pdb.,
where x is the major version of Visual C++ in use.
That may be a good solution for me; I can later rename or copy
the file when building the library.
You should recheck your build configuration.
I could post my makefiles, but I doubt it would help much; I'm
using some fairly elaborate GNU makefiles for portability
reasons. (The makefiles, along with the sources, reside on a
shared drive, with the makefile configuring itself according the
the hostname and various environment variables.)