FIX: L2025 Error on CWnd::DoDataExchange or CObject::SerializeLast reviewed: September 18, 1997Article ID: Q134984 |
1.50 1.51 1.52
WINDOWS
kbprg kbbuglist kbfixlist kberrmsg
The information in this article applies to:
SYMPTOMSLarge MFC applications built for DEBUG may generate the following error messages:
c:\msvc\mfc\lib\lafxcwd.lib(afxinl1.cpp) : error L2025 : DoDataExchange@CWnd@@NECXPAVCDataExchange@@@Z : symbol defined more than once c:\msvc\mfc\lib\lafxcwd.lib(afxinl1.cpp) : error L2025 : Serialize@CObject@@VECXAEVCArchive@@@Z : symbol defined more than onceThis problem occurs only when building a standalone MFC application for DEBUG.
CAUSEThis problem is due to the fact that these functions were defined differently in Vbcore.obj. Vbcore.obj is the module that encapsulates MFC's VBX emulation layer. The problem occurs when the linker picks up the CWnd::DoDataExchange or CObject::Serialize functions from Vbcore.obj, which has the undesirable version.
RESOLUTIONTo work around this problem, extract the file Afxinl1.obj from the file Lafxcwd.lib and add it to the miscellaneous link options for the debug build of the project. To extract the file, use the Lib.exe utility with the following command-line arguments:
LIB LAFXCWD.LIB *AFXINL1.OBJ ;To add the file (Msvc\Mfc\Lib\Afxinl1.obj) to the miscellaneous link options, follow these steps:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. The problem with CObject::Serialize was corrected in Visual C++ version 1.52 for Windows, and the problem with CWnd::DoDataExchange was corrected in Visual C++ version 1.52b for Windows.
|
Additional reference words: 1.50 1.51 1.52 2.50 2.51 2.52 5.50 5.60
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |