当我在 VS2010 中创建新的 C++ 控制台应用程序(选中 MFC 复选框)时,在与 prsht.h
、zmouse.h
相关的编译过程中出现了很多错误, commctrl.h
.
我没有更改此文件中的任何内容,所以我不知道哪里出了问题。这些文件是什么?我如何才能无误地编译程序?
许多错误中的少数 (113)
Error 13 error C1903: unable to recover from previous error(s); stopping compilation c:\program files (x86)\microsoft sdks\windows\v7.0a\include\prsht.h 97 1 qwert
Error 10 error C2065: 'CALLBACK' : undeclared identifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\prsht.h 97 1 qwert
19 IntelliSense: expected a ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\commctrl.h 165 21
Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations c:\program files (x86)\microsoft sdks\windows\v7.0a\include\zmouse.h 141 1 qwert
最佳答案
您可以尝试在 #include "targetver.h"语句之前在 stdafx.h 文件中包含以下内容
#include "Winsock2.h"
#include "Windows.h"
#include "targetver.h"
关于c++ - 创建新的 C++ 控制台应用程序后出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9555953/