qt

QT: fatal error C1083: Cannot open include file: 'type_traits'


I've been spending almost all day trying to get QT installed on my windows machine. I have installed QTCreator with QT 5.14.1 and QWT 6.1.3 (have also tried 6.2.0) and following these instructions with QWT: https://qwt.sourceforge.io/qwtinstall.html

Everything goes fine until I get to the same point where after running nmake it prints:

qwt.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_abstract_scale_draw.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
qwt_bezier.cpp
..\..\..\Qt\Qt5.14.2\5.14.2\msvc2017_64\include\QtCore\qglobal.h(45) : fatal error C1083: Cannot open include file: 'type_traits': No such file or directory

My path variables show that the include directory where type_traits exists is most definitely there.

Any pointers would be great. I'm not sure what else I can possibly do. I've uninstalled and reinstalled my entire .net framework, same with QT. PATH variables


Solution

  • I ended up solving this, and it turned out to be an issue with the compilers I was selecting. I figure this could help people down the line so I will post what I documented on my company portal - the instructions I have written are as follows:

    =====

    Realistically, it doesn't matter which kit you select, as long as the compiler and QT version is set up correctly. What will indicate a correct kit setup is the display of a monitor logo at the label.

    1. Configure a kit by first selecting it as default
    2. C and C++ Compiler -> ''Microsoft Visual C++ Compiler 15.9.xxxx''
      • Compiler version 15.9.xxxx is a part of Microsoft Visual Studio 2017. If you cannot find this compiler in the drop down box, it is most likely because you are missing the 2017 install. Download the BUILD TOOLS and REDIST PACKAGE from here.
    3. Debugger -> ''C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\cdb.exe''
      • If you can't find the debugger, it means you are missing the Windows 10 SDK. [[https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/|Download from here]].
    4. QT Version -> ''Qt 5.14.1 MSVC 2017 32bit''
    5. CMake generator (not sure how important this is, but it seems to make the compile run): Ninja

    QT Configuration