PRB: Error C4226 and Defining WIN32Last reviewed: January 19, 1996Article ID: Q122306 |
The information in this article applies to:
SYMPTOMSCompiling a source file that includes WINDOWS.H generates many C4226 errors, such as:
C:\MSVC20\INCLUDE\olebase.h (8954) : error C4226: nonstandard extension used : '__export' is an obsolete keyword ... C:\MSVC20\INCLUDE\oleauto.h(293) : error C4226: nonstandard extension used : '__huge' is an obsolete keyword ... C:\MSVC20\INCLUDE\ole2.h(4818) : error C4226: nonstandard extension used : '__export' is an obsolete keywordIncluding these header files individually causes the same problem.
CAUSEA number of the OLE header files that are included in the WINDOWS.H file require WIN32 to be defined. While _WIN32 is defined for you, WIN32 is not. Because WIN32 is not defined, the header file logic assumes that the definitions are for 16-bit Windows-based applications and uses the __export and __huge keywords.
RESOLUTIONHere are three possible way to define WIN32:
MORE INFORMATIONThis problem will most likely occur when building console applications. NOTE: Although this was by design, this behavior was changed in Microsoft Visual C++, 32-bit Edition, version 4.0.
|
Additional reference words: 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |