正如标题所示,我在编译基于MFC的应用程序时遇到问题,此问题在安装windows server 2003 platform SDK后立即开始,现在即使我尝试编译新的MFC项目,也会出现以下错误:
c:\program files\microsoft平台
sdk\include\zmouse.h(141):错误
1>c:\program files\microsoft平台
C2433:“HWND”:“inline”不允许
1>c:\program files\microsoft平台
sdk\include\zmouse.h(141):错误
假设。注意:C++不支持
1>c:\program files\microsoft平台
sdk\include\zmouse.h(142):错误
1>c:\program files\microsoft平台
sdk\include\zmouse.h(142):错误
C2146:语法错误:缺少“)”
标识符前
“puiMsh\u msgmouseheel”
1>c:\program files\microsoft平台
C4430:缺少类型说明符-int
默认整数
sdk\include\zmouse.h(147):错误
1>c:\program files\microsoft平台
sdk\include\zmouse.h(148):错误
C2143:语法错误:缺少“;”
在{之前
1>c:\program files\microsoft平台
C2447:“{”:缺少函数头
(旧式正式清单?)
1>c:\program files\microsoft平台
sdk\include\commctrl.h(29):错误
C2146:语法错误:缺少“;”
在标识符“HRESULT”之前
sdk\include\commctrl.h(29):错误
C4430:缺少类型说明符-int
假设。注意:C++不支持
默认整数
1>c:\program files\microsoft平台
sdk\include\commctrl.h(29):错误
C4430:缺少类型说明符-int
假设。注意:C++不支持
sdk\include\prsht.h(97):错误C2065:
1>c:\program files\microsoft平台
sdk\include\prsht.h(97):错误C2065:
“LPFNPSPCALLBACKA”:未声明
1>c:\program files\microsoft平台
sdk\include\prsht.h(97):错误C4430:
注意:C++不支持默认int
1>c:\program files\microsoft平台
sdk\include\prsht.h(97):致命错误
C1903:无法从以前的
在某些情况下,我通过包含windows.h并在stdafx.h顶部定义WIN32\u LEAN\u和\u MEAN来解决这个问题。但是,对于使用静态和动态链接到其他库的大型项目,所建议的解决方案不起作用。我不太清楚为什么会发生这种情况,因为我也尝试过重新安装平台SDK,但没有效果。