INFO: /Zg Not Designed for Use with .CPP or .CXX Files (98592)
The information in this article applies to:
- Microsoft C/C++ for MS-DOS 7.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
This article was previously published under Q98592 SUMMARY
If you specify the /Zg compiler option switch when compiling a file
with the .CPP or .CXX file extension, the compiler may generate a
large number of function prototypes. If the number of prototypes is
very large, a null pointer assignment, run-time overflow, or other
error can occur. This behavior varies depending on the amount of
memory available to the compiler.
The /Zg option is not designed for use with .CPP or .CXX files. It is
designed to generate function prototypes only for .C files.
Sample Code
/*
* Compile options needed: /Zg
*/
#include <iostream.h>
void main()
{
cout << "Hello out there";
}
REFERENCES
For an example of the behavior described in this article, please see the
following article in the Microsoft Knowledge Base:
122042 BUG: Fatal Error C1001 Using /Zg with Large C++ Header Files
Modification Type: | Major | Last Reviewed: | 12/11/2003 |
---|
Keywords: | kbCompiler kbCPPonly kbinfo KB98592 |
---|
|