Qt cannot open include file on Windows

I am very new to Qt and C ++. I follow the qmake example on page 40 (Rapid Dialog Design) of C ++ GUI programming using qt 4 (2nd ed) from Blanchette and Summerfield.

I am running qt 5.5.1 on 64 bit Windows 10. VS 2013 is installed.

I ran qmake -project and qmake gotocell.pro, as in the instructions, then nmake from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64

I got this error:

        "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\nmake.exe" -f Makefile.Release

Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin\uic.exe gotocelldialog.ui -o ui_gotocelldialog.h
        cl -c -nologo -Zc:wchar_t -FS -O2 -MD -Zc:strictStrings -GR -W3 -w34100 -w34189 -w44996 -EHsc -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I. -I. -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include\QtWidgets -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include\QtGui -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include\QtANGLE -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include\QtCore -Irelease -I. -I..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Forelease\ @C:\cygwin64\tmp\nmBC2B.tmp
main.cpp
..\..\..\..\Qt\Qt5.5.1\5.5\msvc2013_64\include\QtCore/qglobal.h(39): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\nmake.exe"' : return code '0x2'
Stop.

What is happening and how to resolve it?

+4
source share
1 answer

, VS- , . , VSX- . , , Qt (, , ), :

C:\Users\alqualos>c:\Qt\Qt5.4.1\5.4\msvc2013_64\bin\qtenv2.bat

C:\Users\alqualos>echo off
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!
C:\Qt\Qt5.4.1\5.4\msvc2013_64>"c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"

C:\Qt\Qt5.4.1\5.4\msvc2013_64>nmake /?

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.
+4

Source: https://habr.com/ru/post/1622420/


All Articles