Microsoft KB Archive/134984

{|
 * width="100%"|

FIX: L2025 Error on CWnd::DoDataExchange or CObject::Serialize

 * }

Q134984

1.50 1.51 1.52 WINDOWS kbprg kbbuglist kbfixlist kberrmsg

-

The information in this article applies to:


 * The Microsoft Foundation Classes (MFC), used with:
 * Microsoft Visual C++

-

SYMPTOMS
Large 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 once

This problem occurs only when building a standalone MFC application for DEBUG.

CAUSE
This 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.

RESOLUTION
To 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:


 * 1) On the Options menu in the Visual Workbench, click Project.
 * 2) From the Project Options dialog box, bring up the Linker Options.
 * 3) Select the Debug Specific option under Build Options.
 * 4) From the Category list, select Miscellaneous.
 * 5) In the Other Options box, enter Afxinl1.obj.

STATUS
Microsoft 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 query words: 1.50 1.51 1.52 2.50 2.51 2.52 5.50 5.60

Keywords : kb16bitonly kbVC150 kbVC151 kbVC152 kbGrpDSMFCATL kbNoUpdate

Issue type : kbbug

Technology : kbAudDeveloper kbMFC