我在 2010 年编译了一个在 VS 2005 中开发的可执行 Win32 控制台应用程序。我已经检查了 VS 2005 的所有设置,但它仍然在构建错误之后抛出。请帮忙。
1>------ Rebuild All started: Project: vssreg, Configuration: Debug x64 ------
1> stdafx.cpp
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): error C2065: '_In_opt_z_' : undeclared identifier
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): error C2143: syntax error : missing ')' before 'const'
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): warning C4229: anachronism used : modifiers on data are ignored
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): error C2182: '_invalid_parameter' : illegal use of type 'void'
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): error C2491: '_invalid_parameter' : definition of dllimport data not allowed
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(543): error C2059: syntax error : ')'
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2065: '_In_opt_z_' : undeclared identifier
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing ')' before 'const'
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): warning C4229: anachronism used : modifiers on data are ignored
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2182: '_invoke_watson' : illegal use of type 'void'
When I tried to put /ShowIncludes option , im getting following includes info
1>------ Rebuild All started: Project: vssreg, Configuration: Debug x64 ------
1> stdafx.cpp
1> Note: including file: c:\rajesh\hak\hak27x64\2010\hak_27_x64\itxvssreg\stdafx.h
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\iostream
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\istream
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ios
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocnum
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\climits
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\yvals.h
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\crtdefs.h
1> Note: including file: C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\sal.h
1> Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vadefs.h