编译器问题,来救救我吧
我用的Vc2008 不知道怎么了现在随便 新建个项目在连接的时候就报错
建立单文档错误如下
22View.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
22.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
stdafx.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
MainFrm.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
22Doc.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
MainFrm.obj : error LNK2019: 无法解析的外部符号 "public: static struct CRuntimeClass * __stdcall CFrameWnd::GetThisClass(void)" (?GetThisClass@CFrameWnd@@SGPAUCRuntimeClass@@XZ),该符号在函数 "protected: static struct CRuntimeClass * __stdcall CMainFrame::_GetBaseClass(void)" (?_GetBaseClass@CMainFrame@@KGPAUCRuntimeClass@@XZ) 中被引用
MainFrm.obj : error LNK2001: 无法解析的外部符号 "public: virtual void __thiscall CFrameWnd::GetMessageString(unsigned int,class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > &)const " (?GetMessageString@CFrameWnd@@UBEXIAAV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z)
22Doc.obj : error LNK2019: 无法解析的外部符号 "public: static struct CRuntimeClass * __stdcall CDocument::GetThisClass(void)" (?GetThisClass@CDocument@@SGPAUCRuntimeClass@@XZ),该符号在函数 "protected: static struct CRuntimeClass * __stdcall CMy22Doc::_GetBaseClass(void)" (?_GetBaseClass@CMy22Doc@@KGPAUCRuntimeClass@@XZ) 中被引用
22View.obj : error LNK2019: 无法解析的外部符号 "public: static struct CRuntimeClass * __stdcall CView::GetThisClass(void)" (?GetThisClass@CView@@SGPAUCRuntimeClass@@XZ),该符号在函数 "protected: static struct CRuntimeClass * __stdcall CMy22View::_GetBaseClass(void)" (?_GetBaseClass@CMy22View@@KGPAUCRuntimeClass@@XZ) 中被引用
uafxcwd.lib(appcore.obj) : error LNK2001: 无法解析的外部符号 ___wargv
uafxcwd.lib(appcore.obj) : error LNK2001: 无法解析的外部符号 ___argc
F:\22\Debug\22.exe : fatal error LNK1120: 7 个无法解析的外部命令
建立MFC共享Dll错误如下
正在创建库 F:\111\Debug\111.lib 和对象 F:\111\Debug\111.exp
111.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
stdafx.obj : error LNK2001: 无法解析的外部符号 __afxForceSTDAFX
uafxcwd.lib(appcore.obj) : error LNK2001: 无法解析的外部符号 ___wargv
uafxcwd.lib(appcore.obj) : error LNK2001: 无法解析的外部符号 ___argc
F:\111\Debug\111.dll : fatal error LNK1120: 3 个无法解析的外部命令
但是我在MFC的使用中把 在共享 DLL 中使用 MFC 换成 在静态库中使用 MFC 有没有问题了
这是为什么呢 请大侠们指点指点。