-1

Windows 7 マシンに VS 2012 をインストールし、クリーンなダイアログ ベースの MFC アプリケーションを作成しました。コンパイルすると、次のエラーが発生します。

1>------ Build started: Project: MFCApplication1, Configuration: Debug Win32 ------
1>  stdafx.cpp
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcore.h(633): error C2065: 'LOAD_LIBRARY_SEARCH_SYSTEM32' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3011): error C2061: syntax error : identifier '__RPC__inout_xcount'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3011): error C2733: 'BSTR_UserMarshal' : second C linkage of overloaded function not allowed
1>          c:\program files\microsoft sdks\windows\v6.0a\include\oaidl.h(5126) : see declaration of 'BSTR_UserMarshal'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3012): error C2061: syntax error : identifier '__RPC__in_xcount'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3012): error C2733: 'BSTR_UserUnmarshal' : second C linkage of overloaded function not allowed
1>          c:\program files\microsoft sdks\windows\v6.0a\include\oaidl.h(5127) : see declaration of 'BSTR_UserUnmarshal'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3016): error C2061: syntax error : identifier '__RPC__inout_xcount'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3016): error C2733: 'HWND_UserMarshal' : second C linkage of overloaded function not allowed
1>          c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3697) : see declaration of 'HWND_UserMarshal'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3017): error C2061: syntax error : identifier '__RPC__in_xcount'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atliface.h(3017): error C2733: 'HWND_UserUnmarshal' : second C linkage of overloaded function not allowed
1>          c:\program files\microsoft sdks\windows\v6.0a\include\oleidl.h(3698) : see declaration of 'HWND_UserUnmarshal'
1>c:\program files (x86)\windows kits\8.0\include\um\uianimation.h(2621): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxanimationhelper.h(411): error C2065: 'UI_E_VALUE_NOT_SET' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxanimationhelper.h(441): error C2065: 'UI_E_VALUE_NOT_SET' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v6.0a\include\dxgitype.h(85): error C2011: 'DXGI_FORMAT' : 'enum' type redefinition
1>          c:\program files (x86)\windows kits\8.0\include\um\dxgiformat.h(11) : see declaration of 'DXGI_FORMAT'
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(309): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(707): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(853): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(923): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(1007): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(1036): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\windows kits\8.0\include\um\d2d1.h(1092): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxwin.h(5584): error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxwin.h(5584): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxwin.h(5584): warning C4183: 'GetITaskbarList3': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxglobals.h(317): error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxglobals.h(317): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxglobals.h(317): warning C4183: 'GetITaskbarList3': missing return type; assumed to be a member function returning 'int'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
4

3 に答える 3

1

私も問題を抱えていました。vs2012 + XP ツールセットを使用するソリューションをコンパイルできるように、vs2012 をインストールしました。VS2012 のUpdate 4をインストールするまでエラーが発生しました。

于 2014-09-26T11:24:52.647 に答える
0

生成されたプロジェクトに変更を加えましたか? また、投稿されたエラーのリストを読むことはできません。改行はどこですか?

于 2013-01-02T17:13:03.630 に答える