Qt创建者:"Cannot open include file: 'windows.h'"
QtCreator: "Cannot open include file: 'windows.h'"
我是Qt的新手,所以我决定从运行一些教程(从QtCreator)开始。我想从教程2"使用Qt快速组件创建Qt快速应用程序"中编译一个项目,但以以下错误消息结束:
D:SoftwareQtSDKQtCreatorbinjom.exe -nologo -j 8 -f Makefile.Release
cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_COMPONENTS_SYMBIAN -DHAVE_MOBILITY -DQT_DLL -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"......SoftwareQtSDKSimulatorQtmsvc2008includeQtCore" -I"......SoftwareQtSDKSimulatorQtmsvc2008includeQtNetwork" -I"......SoftwareQtSDKSimulatorQtmsvc2008includeQtGui" -I"......SoftwareQtSDKSimulatorQtmsvc2008includeQtDeclarative" -I"......SoftwareQtSDKSimulatorQtmsvc2008include" -I"......SoftwareQtSDKSimulatorQtMobilitymsvc2008includeQtSystemInfo" -I"d:SoftwareQtSDKSimulatorQtMobilitymsvc2008includeQtMobilitySimulator" -I"..Tut1qmlapplicationviewer" -I"......SoftwareQtSDKSimulatorQtMobilitymsvc2008include" -I"......SoftwareQtSDKSimulatorQtMobilitymsvc2008includeQtMobility" -I"......SoftwareQtSDKSimulatorQtmsvc2008includeActiveQt" -I"release" -I"..Tut1" -I"." -I"......SoftwareQtSDKSimulatorQtmsvc2008mkspecswin32-msvc2008" -Forelease @C:Users113010~1AppDataLocalTempqmlapplicationviewer.obj.2328.0.jom
qmlapplicationviewer.cpp
d:softwareqtsdksimulatorqtmsvc2008mkspecswin32-msvc2008../win32-msvc2005/qplatformdefs.h(67) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Copying application data...
2 File(s) copied
我有一个Visual Studio 2008 Professional。Qt Creator似乎可以很好地识别它,所以我认为这样的错误应该永远不会出现。
我还想将工具集从Microsoft Visual c++ Compiler 9.0 (x86)更改为MinGW(当单击"管理"按钮时,它也会出现在对话框中),但是组合框是无效的。
我不知道该怎么办
如果你还没有安装Windows SDK,你可能必须安装。
在Qt Creator, Tools- Options, Build&Run, Kits中,选择一个工具包并编辑其属性,将编译器从"Microsoft Windows SDK…"更改为"Microsoft Visual c++ Compiler 9.0 (x86)"
相关文章:
- 在VS代码中交叉编译Windows与Linux上的MinGW的SDL程序
- 在Linux for Windows上编译C++代码时出错
- 在Windows上用C++裁剪HBITMAP
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 既然存在危险,为什么项目要使用-I include开关
- 如何加载(或映射)文件部分的最大大小,但适合在Windows上的RAM
- std::threads可以从Windows DLL中的全局变量创建/销毁吗?
- 有充分的理由在h文件中使用include保护而不是cpp文件吗
- 如何将更多文件夹添加到c++include路径
- 什么是"#include <boost/functional/hash.hpp> "?
- 当我编译webrtc服务器时,Windows上只支持clang-cl
- #include < Windows.h>是不好的做法吗?
- 限制 #include < windows.h 的范围>
- C1189: #error : 窗户。H 已包括在内。MFC 应用不得 #include < Windows.h>
- Qt创建者:"Cannot open include file: 'windows.h'"
- 错误 C1189:#error:窗口。H 已包括在内。MFC 应用不得 #include < Windows.h>"**
- #include < windows.h> 导致大量语法错误
- C++ Windows 命令提示符 C1083 "Cannot open include file: 'Magick++.h' No such file or directory"
- #include < windows.h> 在全局命名空间中定义了许多符号,例如 Polygon
- 致命错误 C1189:#error:窗口。H 已包括在内。MFC 应用不得 #include < Windows.h>