The information in this article applies to:
SYMPTOMSThe Compiler issues the following warning for a class derived from one of the MFC classes: A related warning is issued when an object of some MFC class is embedded as a data member of a user-defined class: See the "Sample Code" section of this article an example of a class declaration that generates these warnings. This problem no longer occurs in vc 4.0 or later. CAUSE
The DLL version of MFC does not export its classes by declaring them with
"class __declspec(dllexport)." Instead, it exports its classes through
entries in the EXPORTS section of its module definition (.def) file. RESOLUTIONBecause the MFC classes are in fact exported, these warnings can be safely ignored. As shown in the DLLHUSK sample, you can disable these warnings by using the following pragma statements:
On the other hand, if the warnings refer to some user-defined class rather
an MFC class, you should ensure that the class is exported before disabling
these warnings.
STATUSThis behavior is by design. MORE INFORMATIONSample Code to Reproduce Behavior
REFERENCESFor more information, please see MFC TechNote 33 for a discussion of the reasons behind the decision to export MFC's classes in the module definition file rather than in the class declaration. Additional query words: 2.00 2.10 2.20 3.00 3.10 3.20
Keywords : kberrmsg kbDLL kbMFC kbVC |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |