CompuServe Thread

#Linking Error

3 messages in this thread
#30573From: Robert KingJul 11, 1994 6:53 PM
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
#30585From: David HollifieldJul 11, 1994 7:57 PM
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
#30612From: Robert KingJul 11, 1994 10:45 PM
David, I tried it and it Worked!! Thanks for a good nights sleep. Robert