Qt Creator compilation error on Windows 7 msvs17
-
Hello
I have installed Qt 5.12.1, then download git repo for Qt Creator v.4.8.1 commit e8df914ef2...
Meet all requirements like below:[0_1552326084764_out2.log](Uploading 100%)- On Windows:
- ActiveState Active Perl
- Visual Studio 2017 pro
- jom
- python 2.8
Qt WebEngine
My configuration bat looks like below:
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64 8.1
SET PATH=C:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\bin;%PATH%
SET PATH=C:\Qt2\Qt5.12.1\Tools\QtCreator\bin;%PATH%
set QMAKESPEC=C:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\mkspecs\winrt-x64-msvc2017Then I call
qmake
jomBut build with lot's of errors I will copy paste some of them below:
cl -BxC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\bin\qmake.exe -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -std:c++14 -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h cd utils\ && ( if not exist Makefile.process_ctrlc_stub C:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\bin\qmake.exe -o Makefile.process_ctrlc_stub C:\dev\external\qt-creator\src\libs\utils\process_ctrlc_stub.pro ) && C:\Qt2\Qt5.12.1\Tools\QtCreator\bin\jom.exe -f Makefile.process_ctrlc_stub jom: C:\dev\external\qt-creator\src\libs\utils\Makefile.process_ctrlc_stub.Release [release\process_ctrlc_stub.obj] Error 2 C:\Qt2\Qt5.12.1\Tools\QtCreator\bin\jom.exe -f Makefile.process_ctrlc_stub.Release cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -std:c++14 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DX64 -D__X64__ -D__x64__ -D"RELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\"" -D"RELATIVE_LIBEXEC_PATH=\".\"" -D"RELATIVE_DATA_PATH=\"../share/qtcreator\"" -D"RELATIVE_DOC_PATH=\"../share/doc/qtcreator\"" -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -D_CRT_SECURE_NO_WARNINGS -DNDEBUG -I..\..\..\src -I..\..\..\src -I..\..\libs -IC:/dev/external/qt-creator/tools -I..\..\plugins -I..\..\libs -I..\3rdparty -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\mkspecs\winrt-x64-msvc2017 -Forelease\ @C:\Users\S0766~1.MAC\AppData\Local\Temp\process_ctrlc_stub.obj.43420.62.jom process_ctrlc_stub.cpp process_ctrlc_stub.cpp(65): error C3861: 'RegisterWindowMessage': identifier not found process_ctrlc_stub.cpp(66): error C3861: 'RegisterWindowMessage': identifier not found process_ctrlc_stub.cpp(68): error C2065: 'WNDCLASSEX': undeclared identifier process_ctrlc_stub.cpp(68): error C2146: syntax error: missing ';' before identifier 'wcex' jom: C:\dev\external\qt-creator\src\libs\utils\Makefile.process_ctrlc_stub [release] Error 2 cd sqlite\ && ( if not exist Makefile C:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\bin\qmake.exe -o Makefile C:\dev\external\qt-creator\src\libs\sqlite\sqlite.pro ) && C:\Qt2\Qt5.12.1\Tools\QtCreator\bin\jom.exe -f Makefile C:\Qt2\Qt5.12.1\Tools\QtCreator\bin\jom.exe -f Makefile.Release cl -c -nologo -FS -FS -Zc:strictStrings -O2 -MD -W3 -w44456 -w44457 -w44458 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DX64 -D__X64__ -D__x64__ -D"RELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\"" -D"RELATIVE_LIBEXEC_PATH=\".\"" -D"RELATIVE_DATA_PATH=\"../share/qtcreator\"" -D"RELATIVE_DOC_PATH=\"../share/doc/qtcreator\"" -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -D_CRT_SECURE_NO_WARNINGS -DSQLITE_API=__declspec(dllexport) -DBUILD_SQLITE_LIBRARY -DSQLITE_THREADSAFE=2 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_JSON1 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DNDEBUG -D_WINDLL -I/src/libs/sqlite -I..\..\..\src -I..\..\..\src -I..\..\libs -IC:/dev/external/qt-creator/tools -I..\..\plugins -I..\..\libs -I..\3rdparty -I. -I..\3rdparty\sqlite -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include\QtWidgets -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include\QtGui -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include\QtANGLE -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include\QtConcurrent -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\include\QtCore -Irelease -IC:\Qt2\Qt5.12.1\5.12.1\winrt_x64_msvc2017\mkspecs\winrt-x64-msvc2017 -Forelease\ @C:\Users\S0766~1.MAC\AppData\Local\Temp\sqlite3.obj.43252.47.jom sqlite3.c ..\3rdparty\sqlite\sqlite3.c(40918): error C2065: 'AreFileApisANSI': undeclared identifier ..\3rdparty\sqlite\sqlite3.c(40918): warning C4312: 'type cast': conversion from 'int' to 'sqlite3_syscall_ptr' of greater size ..\3rdparty\sqlite\sqlite3.c(40948): error C2065: 'CreateFileA': undeclared identifier ..\3rdparty\sqlite\sqlite3.c(40948): warning C4312: 'type cast': conversion from 'int' to 'sqlite3_syscall_ptr' of greater size ..\3rdparty\sqlite\sqlite3.c(40957): error C2065: 'CreateFileW': undeclared identifier ..\3rdparty\sqlite\sqlite3.c(41279): error C2099: initializer is not a constantjom: C:\dev\external\qt-creator\src\libs\sqlite\Makefile.Release [release\sqlite3.obj] Error 2 jom: C:\dev\external\qt-creator\src\libs\utils\Makefile.process_stub.Release [..\..\..\bin\qtcreator_process_stub.exe] Error 1120 link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:X64 /NODEFAULTLIB:kernel32.lib /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /VERSION:4.9 /OUT:..\..\..\bin\qtcreator_process_stub.exe @C:\Users\S0766~1.MAC\AppData\Local\Temp\qtcreator_process_stub.exe.43696.3323.jom MSVCRT.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ) ..\..\..\bin\qtcreator_process_stub.exe : fatal error LNK1120: 1 unresolved externals jom: C:\dev\external\qt-creator\src\libs\utils\Makefile.process_stub [release] Error 2 link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:X64 /NODEFAULTLIB:kernel32.lib /INCREMENTAL:NO /MANIFEST:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:4.9 /OUT:..\..\..\lib\qtcreator\Aggregation4.dll @C:\Users\S0766~1.MAC\AppData\Local\Temp\Aggregation4.dll.42440.17269.jom c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h(49): error C2338: Required feature processenvironment for file c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h not available. environmentmodel.cpp qtcprocess.cpp c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h(49): error C2338: Required feature processenvironment for file c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h not available. c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(36): error C2504: 'QProcess': base class undefined c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(153): error C2653: 'QProcess': is not a class or namespace name c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(153): error C2065: 'ExitStatus': undeclared identifier c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(153): error C2923: 'QMetaTypeId': 'ExitStatus' is not a valid template type argument for parameter 'T' c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(153): error C2913: explicit specialization; 'QMetaTypeId' is not a specialization of a class template c:\dev\external\qt-creator\src\libs\utils\qtcprocess.h(154): error C2913: explicit specialization; 'QMetaTypeId' is not a specialization of a class template jom: C:\dev\external\qt-creator\src\libs\utils\Makefile.Release [release\globalfilechangeblocker.obj] Error 2 savefile.cpp fileutils.cpp fileutils.cpp(309): error C2065: 'PIDLIST_ABSOLUTE': undeclared identifier fileutils.cpp(309): error C2146: syntax error: missing ';' before identifier 'file' fileutils.cpp(309): error C2065: 'file': undeclared identifier fileutils.cpp(310): error C2065: 'file': undeclared identifier fileutils.cpp(310): error C3861: 'SHParseDisplayName': identifier not found fileutils.cpp(314): error C2065: 'file': undeclared identifier fileutils.cpp(314): error C3861: 'SHGetPathFromIDList': identifier not found consoleprocess.cpp c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h(49): error C2338: Required feature processenvironment for file c:\qt2\qt5.12.1\5.12.1\winrt_x64_msvc2017\include\qtcore\qprocess.h not available. c:\dev\external\qt-creator\src\libs\utils\consoleprocess.h(70): error C2653: 'QProcess': is not a class or namespace name c:\dev\external\qt-creator\src\libs\utils\consoleprocess.h(70): error C3646: 'error': unknown override specifier c:\dev\external\qt-creator\src\libs\utils\consoleprocess.h(70): error C2059: syntax error: '(' c:\dev\external\qt-creator\src\libs\utils\consoleprocess.h(70): error C2238: unexpected token(s) preceding ';' c:\dev\external\qt-creator\src\libs\utils\consoleprocess.h(93): error C2653: 'QProcess': is not a class or namespace name winutils.cpp C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\combaseapi.h(1093): error C3861: 'CoCreateInstanceFromApp': identifier not found C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um\combaseapi.h(1114): error C3861: 'CoCreateInstanceFromApp': identifier not found winutils.cpp(116): error C2065: 'VS_FIXEDFILEINFO': undeclared identifier winutils.cpp(116): error C2065: 'versionInfo': undeclared identifier winutils.cpp(119): error C2065: 'versionInfo': undeclared identifier winutils.cpp(126): error C2065: 'versionInfo': undeclared identifier winutils.cpp(126): error C2227: left of '->dwFileVersionMS' must point to class/struct/union/generic type
- On Windows:
-
Hi, the version of Qt you are using for the compilation (winrt_x64_msvc2017) is for building UWP applications, but Qt Creator should be built as a classic Win32 desktop app.
So I think you need to install another flavor of msvc2017 qt, like "MSVC 2017 64-bit" or "MSVC 2017 32-bit" i.e. any version without the UWP prefix.
-
Thanks it helped to set bat file like below + removing QMAKESPEC:
SET PATH=C:\Qt\Qt5.12.1\5.12.1\msvc2017\bin;%PATH%
SET PATH=C:\Qt\Qt5.12.1\Tools\QtCreator\bin;%PATH%