I have a project in Qt which was working. Then once I shut down creator, opened it back up and rebuilt the project, Qt now says it can't find any of the std library headers. The error message is:
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore\qglobal.h:45: error:
C1083: Cannot open include file: 'cstddef': No such file or directory
(Along with all the other std library headers I used)
I am building with vs 2015, and it would seem like Qt is not setting up the VS environment, but here's the thing, my other projects (in the same directory) build just fine. I have tried deleting the .pro files and the build files, re configuring the project, as well as reinstalling Qt, and running Qt from the command line. All to no avail.
I would just like to know what/where in the Qt environment is VS setup and what could cause only one project to behave this way? I assumed it would be in the Makefile, but I couldn't see anything when I went through it.
The entire compile output is:
10:13:03: Running steps for project QARD_Viewer...
10:13:03: Configuration unchanged, skipping qmake step.
10:13:03: Starting: "D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe"
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" -f Makefile.Release
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DWIN64 -DQWT_DLL -DQT_NO_DEBUG -DQT_WEBENGINE_LIB -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -I..\QARD_Viewer -I. -I"D:/Users/JSendall/Documents/PCL/GUI/QARD_Viewer/../PXGFtoFile/AARD Backup" -ID:/Users/JSendall/Documents/PCL/GUI/QARD_Viewer/../SIMD_vectors/SIMD_vectors -I"D:/Users/JSendall/Documents/PCL/GUI/QARD_Viewer/../PCL Proc Server/Common files" -ID:\Devlibs\boost_1_62_0 -ID:\Devlibs\Qwt-6.1.3\include -I..\..\Deployment\Code\PXGF_socket\PXGF_socket -I..\..\Deployment\Code\QardDetector\cfarLib -I..\..\Deployment\Code\coordHandling\coordHandling -I"..\..\Deployment\Code\PXGFtoFile\AARD Backup" -I"..\..\Deployment\Code\PCL Proc Server\Common files" -I..\..\Deployment\Code\SIMD_vectors\SIMD_vectors -I..\..\Deployment\Code\pxgf_rpk_client\pxgf_rpk_client -I..\..\Deployment\Code\QardDetector\QardDetector -ID:\Devlibs\Qt\5.7\msvc2015_64\include -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtWebEngine -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtWebEngineWidgets -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtWebEngineCore -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtQuick -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtSvg -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtWidgets -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtGui -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtANGLE -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtWebChannel -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtQml -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtNetwork -ID:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore -Irelease -I. -ID:\Devlibs\Qt\5.7\msvc2015_64\mkspecs\win32-msvc2015 -Forelease\ #C:\Users\JSendell\AppData\Local\Temp\nm6F02.tmp
main.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
mainwindow.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
ardplot_t.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore\qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
qread.cpp
..\..\Deployment\Code\PCL Proc Server\Common files\QARDHeader.h(3): fatal error C1083: Cannot open include file: 'cstdint': No such file or directory
cfarplotter.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore\qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
detectiondisplay.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
geocode_data_manager.cpp
D:\Devlibs\Qt\5.7\msvc2015_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
cacfdetector.cpp
..\..\Deployment\Code\QardDetector\cfarLib\caCfarDetector.h(2): fatal error C1083: Cannot open include file: 'numeric': No such file or directory
label_connected.cpp
d:\users\jsendall\documents\pcl\gui\qard_viewer\label_connected.h(3): fatal error C1083: Cannot open include file: 'vector': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.
10:13:04: The process "D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" exited with code 2.
Error while building/deploying project QARD_Viewer (kit: Desktop Qt 5.7.0 MSVC2015_64bit)
When executing step "Make"
10:13:04: Elapsed time: 00:01.
Related
I am trying to set up the boost libraries for C++ in Visual Studio Code: I have extracted the zip file to my program files but when I go to build it all with bootstrap.bat it comes up with this error. It works fine for the first 4 then stops. I have no additional permissions set up
C:\Users\*user*>cd "C:\Program Files\boost\boost_1_78_0"
C:\Program Files\boost\boost_1_78_0>bootstrap.bat
Building Boost.Build engine
LOCALAPPDATA=C:\Users\Alex\AppData\Local
Found with vswhere C:\Program Files\Microsoft Visual Studio\2022\Community
Found with vswhere C:\Program Files\Microsoft Visual Studio\2022\Community
Call_If_Exists "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\..\..\VC\Auxiliary\Build\vcvarsall.bat" AMD64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.0.5
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
###
### Using 'vc143' toolset.
###
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine>"cl" /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL /EHsc -DNDEBUG builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp execunix.cpp filent.cpp filesys.cpp fileunix.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp object.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp jam_strings.cpp startup.cpp subst.cpp sysinfo.cpp timestamp.cpp variable.cpp w32_getreg.cpp modules/order.cpp modules/path.cpp modules/property-set.cpp modules/regex.cpp modules/sequence.cpp modules/set.cpp /link kernel32.lib advapi32.lib user32.lib
builtins.cpp
class.cpp
command.cpp
compile.cpp
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\class.cpp : fatal error C1083: Cannot open compiler generated file: 'C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\class.obj': Permission denied
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\command.cpp : fatal error C1083: Cannot open compiler generated file: 'C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\command.obj': Permission denied
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\compile.cpp : fatal error C1083: Cannot open compiler generated file: 'C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\compile.obj': Permission denied
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\builtins.cpp : fatal error C1083: Cannot open compiler generated file: 'C:\Program Files\boost\boost_1_78_0\tools\build\src\engine\builtins.obj': Permission denied
cl : Command line error D8040 : error creating or communicating with child process
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine>dir *.exe
vol drive c
vol serial number
Directory of C:\Program Files\boost\boost_1_78_0\tools\build\src\engine
File Not Found
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine>copy /b .\b2.exe .\bjam.exe
The system cannot find the file specified.
Failed to build Boost.Build engine.
C:\Program Files\boost\boost_1_78_0>
All I want these for is for the Python Library, is there a way to move said library directly into the MINGW include file and ignore the rest that won't work?
I am trying to compile 5.6.2. I have already compiled OpenSSL. nmake ran for about half an hour and then I get this error: (using quotes because they line-break which IMO improves readability; not sure if language is an issue here; if yes, I might translate certain lines...)
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zi -MTd -MP -W3 -w44456 -w44457 -w44458 /Fd.obj\debug\qwebpd.vc.pdb -DUNICODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -I......\3rdparty\libwebp -I......\3rdparty\libwebp\src -I......\3rdparty\libwebp\src\dec -I......\3rdparty\libwebp\src\enc -I......\3rdparty\libwebp\src\dsp -I......\3rdparty\libwebp\src\mux -I......\3rdparty\libwebp\src\utils -I......\3rdparty\libwebp\src\webp -IC:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtbase\include
-IC:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtbase\include\QtGui
-IC:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtbase\include\QtCore
-I.moc\debug -IC:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl\Release\include
-IC:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtbase\mkspecs\win32-msvc2015
-Fo.obj\debug\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtimageformats\src\3rdparty\libwebp\src\dsp\upsampling_sse2.obj
......\3rdparty\libwebp\src\dsp\upsampling_sse2.c
upsampling_sse2.c
C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2\qtimageformats\src\3rdparty\libwebp\src\dsp\upsampling_sse2.c
: fatal error C1083: Datei (vom Compiler generiert) kann nicht
geöffnet werden: "": Invalid argument
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"": Rückgabe-Code "0x1"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EXE"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
Stop.
I have created the makefile before with:
configure -debug-and-release -force-debug-info -opensource
-confirm-license -static -I "C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl\Release\include"
-L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -l Gdi32 -no-opengl -openssl-linked OPENSSL_LIBS_DEBUG="C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl_debug\Debug\lib\ssleay32.lib
C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl_debug\Debug\lib\libeay32.lib"
OPENSSL_LIBS_RELEASE="C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl\Release\lib\ssleay32.lib
C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\openssl\Release\lib\libeay32.lib"
-mp -nomake examples -nomake tests -platform win32-msvc2015
Any idea what could we wrong here? What I could even check? I just do not understand this error message.
I could solve the issue...
The windows path was too long. I created a junction directory to not be forced to move all files to other paths.
being in C:\Users\Michael I typed in the cmd:
mklink /J /D tgqt C:\Users\Michael\Documents\vs13\Projects\Telegram\build\Libraries\qt5_6_2
After cd tgqt I have just built from that directory et voilà...
I am getting following when I try to build chromium
c:\src\chromium\src>ninja -C out\Default2 chrome
ninja: Entering directory `out\Default2'
[6/28555] CXX obj/base/base_static/pe_image.obj
FAILED: obj/base/base_static/pe_image.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_static/pe
_image.obj.rsp /c ../../base/win/pe_image.cc /Foobj/base/base_static/pe_image.ob
j /Fd"obj/base/base_static_cc.pdb"
c:\src\chromium\src\base\win\pe_image.cc(8): fatal error C1083: Cannot open incl
ude file: 'stddef.h': No such file or directory
[7/28555] CXX obj/base/base_paths/base_paths.obj
FAILED: obj/base/base_paths/base_paths.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_paths/bas
e_paths.obj.rsp /c ../../base/base_paths.cc /Foobj/base/base_paths/base_paths.ob
j /Fd"obj/base/base_paths_cc.pdb"
c:\src\chromium\src\base\files\file_path.h(105): fatal error C1083: Cannot open
include file: 'stddef.h': No such file or directory
[8/28555] CXX obj/base/base_paths/base_paths_win.obj
FAILED: obj/base/base_paths/base_paths_win.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_paths/bas
e_paths_win.obj.rsp /c ../../base/base_paths_win.cc /Foobj/base/base_paths/base_
paths_win.obj /Fd"obj/base/base_paths_cc.pdb"
c:\program files (x86)\windows kits\10\include\10.0.10586.0\um\winnt.h(34): fata
l error C1083: Cannot open include file: 'ctype.h': No such file or directory
[11/28555] ACTION //base:build_date(//build/toolchain/win:x64)
ninja: build stopped: subcommand failed.
This is my first time building chroium,
I have visual studio 2015 community edition installed with Windows SDK , and also installed WDK seperately without which "gn gen out/Default2" was not working
Any idea what this issue could be
1.Your build errors:
c:\src\chromium\src\base\win\pe_image.cc(8): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
c:\src\chromium\src\base\files\file_path.h(105): fatal error C1083: Cannot openinclude file: 'stddef.h': No such file or directory
c:\program files (x86)\windows kits\10\include\10.0.10586.0\um\winnt.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
2.You may need to check the header files which caused the build errors:
The headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK.
Excerpt from the above:
Visual C++ SDK. The headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK. This SDK is included with Visual Studio; it is installed by default to C:\Program Files (x86)\Windows Kits\10. The debug ucrtbased.dll is also included as part of this SDK and is installed to the system directory.
3.You can also try to reference the following links, it's the same issue with yours:
I read a lot of instructions and tutorials how to do that, and I tried many of that, but 6 hours have gone and it's all the same. Please help...
I know, there are some similar questions on stackoverflow but answers on them doesn't help.
Problem:
I want to build Mysql driver for my qt program. According to instructions I did:
1) set mysql=C:\PROGRA~1\MySQL\MYSQLS~1.6 (full path is C:\Program Files\MySQL\MySQL Server 5.6)
2)
cd C:\Qt_Sources\5.2.1\Src\qtbase\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" mysql.pro
mingw32-make
mingw32-make from (C:\MinGW\bin)
After this I got:
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt_Sources/5.2.1/Src/qtbase/src/plugins/
sqldrivers/mysql'
Makefile.Release:65: *** missing separator. Stop.
mingw32-make[1]: Leaving directory 'C:/Qt_Sources/5.2.1/Src/qtbase/src/plugins/s
qldrivers/mysql'
Makefile:40: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2
Also I tried nmake from (C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin) and result is:
Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\nmake.exe" -
f Makefile.Release all
Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MD -GR -W3 -w34100 -w34189 -DUNICO
DE -DWIN32 -DQT_EDITION=QT_EDITION_DESKTOP -DQT_EVAL -DQT_NO_CAST_TO_ASCII -DQT_
NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQ
T_CORE_LIB -DNDEBUG -I"%mysql%\include" -I"C:\Qt\5.2.1\msvc2012\include\QtSql\5.
2.1" -I"C:\Qt\5.2.1\msvc2012\include\QtSql\5.2.1\QtSql" -I"C:\Qt\5.2.1\msvc2012\
include" -I"C:\Qt\5.2.1\msvc2012\include\QtSql" -I"C:\Qt\5.2.1\msvc2012\include\
QtCore\5.2.1" -I"C:\Qt\5.2.1\msvc2012\include\QtCore\5.2.1\QtCore" -I"C:\Qt\5.2.
1\msvc2012\include\QtCore" -I".moc\release" -I"..\..\..\..\mkspecs\win32-msvc201
2" -Fo.obj\release\ #C:\Users\GOODSP~1\AppData\Local\Temp\nmD5C6.tmp
NMAKE : fatal error U1077: 'cl' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\bin\nmake.exe"' : return code '0x2'
Stop.
Please explain what I did wrong...
Yes, I finally resolve this issue...
I used qmake for another qt version, for me I think I used qmake from msvc2012, and tried to make it by mingw32-make and nmake (but nmake from visual studio 2011.. maybe this is the problem).
And solution is:
Use qmake from mingw48_32 directory (for me it's: C:\Qt\5.2.1\mingw48_32. Install qt sources with mingw, if you don't have it). After that all works fine with mingw32-make.
I need to build a Qt5 64 bit program which links to static .lib libraries (compiled with /MT). I tried changing the lines below from MD to MT:
QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
QMAKE_CFLAGS_DEBUG = -Zi –MTd
in the file D:\Qt\Qt5.0.0src\qtbase\mkspecs\win32-msvc2010\qmake.conf
and recompiling it with
configure -prefix %CD%\qtbase -debug-and-release -opensource -platform win32-msvc2010 -opengl desktop
and then nmaking it, but it failed with:
XPathGrammar.cpp
Generating Code...
lib /NOLOGO /OUT:release\WebCore.lib #C:\Users\Paul\AppData\Local\Temp\WebCore.lib.4480.3319717.jom
LINK : fatal error LNK1181: cannot open input file '.obj\release_shared\SettingsMacros.obj'
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore.Target.Release [release\WebCore.lib] Error 1181
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore.Target [release] Error 2
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore [sub-Target-pri-make_first-ordered] Error 2
jom: D:\Qt\Qt5.0.0src\qtwebkit\Makefile [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
jom: D:\Qt\Qt5.0.0src\Makefile [module-qtwebkit-make_first] Error 2
It seems that the "SettingsMacros.obj" file doesn't get generated. Why is that?
Do I need to include "-static" in the configure string? I know that Qt doesn't get along with /MT but my project needs it otherwise I would not be able to link those .lib files
yes, you do need to add -static. Worked for me.