Compartir a través de


DllGetClassObject already defined

When you upgrade your project from VC2005 to VC2008 you might get these errors:

mfcs90u.lib(oleexp.obj) : error LNK2005: _DllGetClassObject@12 already defined in d.obj
mfcs90u.lib(oleexp.obj) : error LNK2005: _DllCanUnloadNow@0 already defined in d.obj

Strictly in release builds though.

You can add "AFX_MANAGE_STATE(AfxGetStaticModuleState());" to the first line of InitInstance() in dllmain.cpp.

Comments