This article was previously published under Q131147
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
In the Visual C++ debugger, if you debug an application built usingprecompiled header (PCH) options, the debugger's expression evaluator maygenerate errors when viewing classes that were declared but not defined inthe precompiled header file.
One of the following errors may be generated depending on the Visual C++version:
CXX0017 Error: symbol "xxxx" cannot be found
CXX0030 Error: expression cannot be evaluated
CXX0033 Error: error in OMF type information
CV1255 Error: no data members
NOTE: The first error message is very generic, and can occur for severaldifferent reasons including this one.
When the compiler writes out type information into the program database(.PDB) file, incomplete type information is written for the forward classdeclaration when the full definition has not yet been compiled.
When the module containing the full class definition is compiled, thecomplete type information is not replacing the incomplete type informationin the .PDB file.
Here are three possible workarounds:
Turn off PCH usage. This avoids the problem altogether. -or-
Include the full definition of the class in .PCH file. This causes the complete type information to be written to the .PDB file. -or-
Compile using C7 Compatible Debug Info switch (/Z7). This will not use a .PDB file to store type information. You may also need to use the /Yd option to include PCH debug information in all object modules.
Microsoft has confirmed this to be a bug in the Microsoft products listedat the beginning of this article. This problem was fixed in MicrosoftVisual C++, 32-bit Edition, version 4.0.
The following small sample application reproduces the problem. In theVisual C++ integrated debugger, it is not possible to expand "A" in thelocals window, watch window, or with a quickwatch.