在Windows XP上编译VS2010中的错误(C4430 C2143等),而不是Windows 7

时间:2011-02-22 02:11:58

标签: visual-studio-2010 windows-7 mfc visual-studio-2005 windows-xp

我正在尝试将使用VS2005创建的MFC项目转换为VS2010。当我尝试在我的笔记本电脑上编译项目(Windows 7 x64)时,它运行时没有VS2010的任何问题,但另一台计算机(奇怪的是创建项目的地方)在winuser.h(下面)中给出了一堆错误。我试图研究和追查原因无济于事,任何帮助都将不胜感激。

Error   4   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11405   1   Visualization
Error   5   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h   11408 1   Visualization
Error   7   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11412   1   Visualization
Error   8   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11415   1   Visualization
Error   10  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11419   1   Visualization
Error   11  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11422   1   Visualization
Error   24  error C2513: 'BOOL *' : no variable declared before '=' c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11492   1   Visualization
Error   18  error C2491: 'GetMonitorInfoW' : definition of dllimport data not allowed   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11484   1   Visualization
Error   14  error C2491: 'GetMonitorInfoA' : definition of dllimport data not allowed   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11478   1   Visualization
Error   21  error C2275: 'LPRECT' : illegal use of this type as an expression   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11492   1   Visualization
Error   22  error C2275: 'LPARAM' : illegal use of this type as an expression   c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11492   1   Visualization
Error   20  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11492   1   Visualization
Error   23  error C2165: 'left-side modifier' : cannot modify pointers to data  c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11492   1   Visualization
Error   12  error C2146: syntax error : missing ')' before identifier 'hMonitor'    c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11478   1   Visualization
Error   16  error C2146: syntax error : missing ')' before identifier 'hMonitor'    c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11484   1   Visualization
Error   3   error C2143: syntax error : missing ';' before '__stdcall'  c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11405   1   Visualization
Error   6   error C2143: syntax error : missing ';' before '__stdcall'  c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11412   1   Visualization
Error   9   error C2143: syntax error : missing ';' before '__stdcall'  c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11419   1   Visualization
Error   15  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11479   1   Visualization
Error   19  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0a\include\winuser.h 11485   1   Visualization

1 个答案:

答案 0 :(得分:0)

这是不同机器之间还是不同构建配置(win32 vs x64)之间的问题?如果它是前者,在两台机器上区分winuser.h文件,它们应该是相同的。

希望这有帮助。

干杯,

Sebastiaan