2011-01-04 30 views
1

最近VS2010 Ultimateがインストールされました。私は、MFCのダイアログベースのプログラムを作成しようとしています。私は、組み込みのテンプレートを使用し、すべてのデフォルトのオプションを取って、プロジェクトをコンパイルします。私は次のリンクエラーを取得します。VS2010 MFCダイアログベースのプロジェクトのリンカーエラー

1>------ Build started: Project: test1, Configuration: Debug Win32 ------ 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CWinApp::GetProfileIntW(wchar_t const *,wchar_t const *,int)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileInt(wchar_t const *,wchar_t const *,int)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall CWinApp::GetProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" (?GetP[email protected]@@[email protected][email protected][email protected][email protected]@@@@@[email protected]@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileStringW(wchar_t const *,wchar_t const *,wchar_t const *)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::GetProfileBinary(wchar_t const *,wchar_t const *,unsigned char * *,unsigned int *)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::WriteProfileBinary(wchar_t const *,wchar_t const *,unsigned char *,unsigned int)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDocument * __thiscall CWinApp::OpenDocumentFile(wchar_t const *,int)" ([email protected]@@[email protected]@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(wchar_t const *,unsigned long,unsigned long (__stdcall*)(void *),void *,unsigned long,unsigned long)" ([email protected]@@[email protected]@Z) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CWinApp::RegisterWithRestartManager(int,class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > const &)" ([email protected]@@[email protected][email protected][email protected][email protected]@@@@@[email protected]@@Z) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall CWinApp::ApplicationRecoveryCallback(void *)" ([email protected]@@[email protected]) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual class CDataRecoveryHandler * __thiscall CWinApp::GetDataRecoveryHandler(void)" ([email protected]@@[email protected]@XZ) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::IsTaskbarInteractionEnabled(void)" ([email protected]@@UAEHXZ) 
1>test1.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWinApp::RestartInstance(void)" (?RestartInstance[email protected]@@UAEHXZ) 
1>test1.obj : error LNK2019: unresolved external symbol "public: __thiscall CShellManager::CShellManager(void)" ([email protected]@[email protected]) referenced in function "public: virtual int __thiscall Ctest1App::InitInstance(void)" ([email protected]@@UAEHXZ) 
1>test1.obj : error LNK2019: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" ([email protected]@[email protected]) referenced in function "public: virtual __thiscall CDialogEx::~CDialogEx(void)" ([email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual __thiscall CDialogImpl::~CDialogImpl(void)" ([email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const * __stdcall CDialogEx::GetThisMessageMap(void)" ([email protected]@@[email protected]@XZ) 
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CDialogEx::CDialogEx(unsigned int,class CWnd *)" ([email protected]@[email protected]@@@Z) referenced in function "public: __thiscall CAboutDlg::CAboutDlg(void)" ([email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CDialogEx::GetRuntimeClass(void)const " ([email protected]@@[email protected]@XZ) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual class CMenu * __thiscall CWnd::GetMenu(void)const " ([email protected]@@[email protected]@XZ) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CWnd::SetMenu(class CMenu *)" ([email protected]@@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CWnd::OnDrawIconicThumbnailOrLivePreview(class CDC &,class CRect,class CSize,int,int &)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CDialogEx::OnCommand(unsigned int,long)" ([email protected]@@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CDialogEx::PreTranslateMessage(struct tagMSG *)" ([email protected]@@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInputs(unsigned int,struct tagTOUCHINPUT *)" ([email protected]@@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnTouchInput(class CPoint,int,int,struct tagTOUCHINPUT *)" ([email protected]@@[email protected]@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned long __thiscall CWnd::GetGestureStatus(class CPoint)" ([email protected]@@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureZoom(class CPoint,long)" ([email protected]@@[email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePan(class CPoint,class CPoint)" ([email protected]@@[email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureRotate(class CPoint,double)" ([email protected]@@[email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGestureTwoFingerTap(class CPoint)" ([email protected]@@[email protected]@@Z) 
1>test1Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CWnd::OnGesturePressAndTap(class CPoint,long)" ([email protected]@@[email protected]@[email protected]) 
1>test1Dlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CWnd::SendMessageW(unsigned int,unsigned int,long)const " ([email protected]@@[email protected]) referenced in function "protected: void __thiscall Ctest1Dlg::OnPaint(void)" ([email protected]@@IAEXXZ) 
1>c:\Projects\test1\Debug\test1.exe : fatal error LNK1120: 32 unresolved externals 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

私はVS2010を再インストールしようとしましたが、C++がインストールされていることを確認しましたが、まだエラーが発生します。私は、複数のドキュメントと単一のドキュメントタイプを作成しようとしましたが、どちらも動作します。だから、Dialogをベースにしたものだけがエラーを持っています。

ありがとう、 ジョン。

+0

MFCライブラリにリンクしていないようです。 –

答えて

0

MFCにリンクする必要があります。 「プロジェクト」 - >「プロジェクトプロパティ」 - >「構成プロパティ」 - >「MFCの使用」で「静的ライブラリにMFCを使用する」を入力してください。

関連する問題