All,
I am having a bazaar linking problem with VC++. The
project uses the CVBControl and CDatabase classes in the MFC.
If a static collection class object (CStringArray, CObList etc.) is
declared as follows:
{
CStringArray m_strarray;
or
CObList m_list;
}
I get the following link error:
c:\msvc\mfc\lib\lafxcwd.lib(afxinl1.cpp) : error L2025:
Serialize@CObject@@VECXAEVCArchive@@@Z : symbol defined more
than once
This problem started with the first use of AfxRegisterVBEvent()
and the first declaration of a static collection class object. If
the object is created using "new CStringArray()" there are no
linking errors or any runtime problems. If anyone has any ideas
please let me know.
Robert
Robert,
This is a known linker problem. It seems to happen only for very large apps,
and only in debug mode.
The workaround is to extract afxinl1.obj from the lib file and link it into
your project explicitly.
Hope this helps,
David