From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-07-07 06:20:03
> I could test it only under VC-8.0. I compiled your test case without
> your /Yl patch applied, and I saw a warning when I ran bjam.exe alone
> (/Z7 build).
> But for /Zi builds (bjam.exe debug-store=database) your test case
> doesn't reproduce any problems, does it? No warnings, and debug info
> is present for both test-lib.cpp and test.cpp.
> P.S. It's a pity that debug-store=object by default. In studios
> "debug-store=database" is by default.
True, I do not have the time to fiddle with it to produce the
problems. The MS page mentions other possible problems beside
Note If you build a static library in a Visual Studio .NET version
with precompiled header file, and you use the compiler debug switches
/ZI or /Zi, you may not receive the errors that are listed in this
article, but you may see either of the following two problems while
debugging your application and trying to view any variables from the
library in the Watch window:
â¢ You may receive the following error message in the Watch window:
CXX0033:Error:error in OMF type information
â¢ While expanding a class object, you may see only blank entries for
the class members.
The following is taken from VC8 MSDN page about -Yl switch:
When you specify the /Yc (Create Precompiled Header File) and /Z7,
/Zi, /ZI (Debug Information Format) options, the compiler creates a
precompiled header file that contains debugging information. An error
can occur when you store the precompiled header in a library, use the
library to build an object module, and the source code does not refer
to any of the functions the precompiled header file defines.
To solve the problem, specify /Ylsymbol, where symbol is the name of
an arbitrary symbol in the library, when you create a precompiled
header file that does not contain any function definitions. This
option directs the compiler to store the debugging information in the
precompiled header file.
I can see no reason not to add -Yl flag to pch creation, as it has no
nasty side effects that I am aware of. Since the debug format can be
chosen by the user, I think a build system should be able to work
correctly regardless of that. IMHO, leaving PCH support incomplete in
this regard is not a good idea.
-- Bojan Resnik
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk