I’m updating a project from VS2008 to VS2010 and I’m getting this error:
uafxcwd.lib(afxwinappex.obj) : error LNK2005: “public: virtual struct
CRuntimeClass * __thiscall CWinAppEx::GetRuntimeClass(void)const ”
(?GetRuntimeClass@CWinAppEx@@UBEPAUCRuntimeClass@@XZ) already defined
in WinAppEx.obj
I’ve tried everything I can think of. uafxcwd.lib is in the “Additional Dependencies” and “Ignore Specific Default Libraries” settings in the Linker. For some reason it doesn’t seem to ignore the uafxcwd.lib library.
Any help would be greatly appreciated.
Fixed it. The issue is that uafxcwd.lib in VS2010 introduced a new class cwinappex. This was identically named to the class I had made, causing the conflict.
Who’d have thunk it?