FIX: Assert on Olefact.cpp Line 52 with IMPLEMENT_DYNCREATE and IMPLEMENT_OLECREATE_EX (325141)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q325141 SYMPTOMS When using IMPLEMENT_DYNCREATE and IMPLEMENT_OLECREATE_EX,
you receive the following error message:
--------------------------- Microsoft Visual C++ Debug Library
--------------------------- Debug Assertion Failed!
Program:
c:\projects\debug\Repro.exe File: olefact.cpp Line: 52
For
information on how your program can cause an assertion failure, see the Visual
C++ documentation on asserts. (Press Retry to debug the application)
--------------------------- Abort Retry Ignore
---------------------------
CAUSE The Visual C++ .NET compiler does not respect the order of
declaration when __declspec(selectany) is used. RESOLUTION In the Stdafx.h header file of the project that consumes
your Microsoft Foundation Classes (MFC) extension DLL, predefine an empty
AFX_COMDAT symbol by pasting the following code before you include (#include)
any other header files:
#define AFX_COMDAT
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Microsoft Visual C++ .NET (2003).
Modification Type: | Major | Last Reviewed: | 4/11/2003 |
---|
Keywords: | kbfix kbbug kbCompiler kbpending KB325141 |
---|
|