Building QT 6.11.0 for Win32 platform
-
I have in past built Qt6 version 6.8.1 for Win32 platform by using the sources. I used below instructions that time.
Question 1: Are these build instructions still valid OR is the build process changed if I want to build latest version i.e. Qt 6.11.0 for Win32 platform?
Question 2: I installed PostgreSQL/9.5 that time due to some reason. What version is required now for Qt 6.11.0 while buiding for Win32 platform?Build instructions I used for Qt 6.8.1 for Win32 Platform
-
git clone --branch v6.8.1 git://code.qt.io/qt/qt5.git .
-
e:\QT6>cd qt-build
-
Then issue below command
e:\QT6\qt-build>..\configure.bat -debug-and-release -force-debug-info -nomake examples -qt-zlib -qt-translations-submodules qtbase -openssl-runtime -init-submodules -- -DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR="C:\workarea\openssl-3.4.0.1-windows-msvc143-x86" -DCMAKE_INSTALL_PREFIX="C:/workarea/QT6_INSTALL" -DPOSTGRESQL_INCLUDE_DIR="C:/Program Files (x86)/PostgreSQL/9.5/include" -DPOSTGRESQL_LIBRARIES="C:/Program Files (x86)/PostgreSQL/9.5/lib/libpq.lib"
-
e:\QT6>cmake --build . --parallel
-
e:\QT6\qt-build>ninja install
-
-
I have in past built Qt6 version 6.8.1 for Win32 platform by using the sources. I used below instructions that time.
Question 1: Are these build instructions still valid OR is the build process changed if I want to build latest version i.e. Qt 6.11.0 for Win32 platform?
Question 2: I installed PostgreSQL/9.5 that time due to some reason. What version is required now for Qt 6.11.0 while buiding for Win32 platform?Build instructions I used for Qt 6.8.1 for Win32 Platform
-
git clone --branch v6.8.1 git://code.qt.io/qt/qt5.git .
-
e:\QT6>cd qt-build
-
Then issue below command
e:\QT6\qt-build>..\configure.bat -debug-and-release -force-debug-info -nomake examples -qt-zlib -qt-translations-submodules qtbase -openssl-runtime -init-submodules -- -DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR="C:\workarea\openssl-3.4.0.1-windows-msvc143-x86" -DCMAKE_INSTALL_PREFIX="C:/workarea/QT6_INSTALL" -DPOSTGRESQL_INCLUDE_DIR="C:/Program Files (x86)/PostgreSQL/9.5/include" -DPOSTGRESQL_LIBRARIES="C:/Program Files (x86)/PostgreSQL/9.5/lib/libpq.lib"
-
e:\QT6>cmake --build . --parallel
-
e:\QT6\qt-build>ninja install
@Qt6User Build instructions for Windows: https://doc.qt.io/qt-6/windows-building.html
PostgreSQL version is mentioned here: https://doc.qt.io/qt-6/sql-driver.html -
-
@Qt6User Build instructions for Windows: https://doc.qt.io/qt-6/windows-building.html
PostgreSQL version is mentioned here: https://doc.qt.io/qt-6/sql-driver.htmlI have tried below sequence of things to build QT 11.0 for Win32 platform
Clone the repo
1.c:\workarea\qt_win32>git clone --branch v6.11.0 git://code.qt.io/qt/qt5.git C:\workarea\Qt\srcSet the Win32 environment
c:\workarea>mkdir qtwin32-buildcd qtwin32-buildc:\workarea\qtwin32-build>"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86Initate the build commands
5.c:\workarea>cd qtwin32-buildc:\workarea\qtwin32-build>C:\workarea\Qt\src\configure -debug-and-release -force-debug-info -nomake examples -nomake tests -qt-zlib -DQT_FEATURE_openssl=ON -DQT_FEATURE_openssl_runtime=OFF -init-submodules -submodules qtbase,qtimageformats,qtdeclarative,qttranslations -submodules qtbase,qtimageformats,qtdeclarative,qttranslations -prefix C:/workarea/QT610_INSTALL32 -platform win32-msvc -DOPENSSL_ROOT_DIR="C:/workarea/openssl-3.4.0.3-windows-msvc143-x86" -DOPENSSL_INCLUDE_DIR=C:/workarea/openssl-3.4.0.3-windows-msvc143-x86/include -DOPENSSL_LIBRARIES="C:/workarea/openssl-3.4.0.3-windows-msvc143-x86/lib/libssl.lib;C:/workarea/openssl-3.4.0.3-windows-msvc143-x86/lib/libcrypto.lib" -DQt6Sql_INCLUDE_DIR="C:/workarea/psql9.4.26-1_win32/pgsql/include" -DQt6Sql_LIBRARIES="C:/workarea/psql9.4.26-1_win32/pgsql/lib/libpq.lib"But then I run into below error message indicating there is some code meant for Windows 64 only.
My intention is to Really build for Win32 So please guide how can i move ahead?
[1327/12375] Building CXX object qtbase\src\corelib\CMakeFiles\Core.dir\RelWithDebInfo\io\qioring_win.cpp.obj FAILED: qtbase/src/corelib/CMakeFiles/Core.dir/RelWithDebInfo/io/qioring_win.cpp.obj C:\PROGRA~1\MICROS~4\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx86\x86\cl.exe /nologo /TP -DC:/workarea/openssl-3.4.0.3-windows-msvc143-x86/lib/libcrypto.lib -DCore_EXPORTS -DNOMINMAX -DOPENSSL_INCLUDE_DIR=C:/workarea/openssl-3.4.0.3-windows-msvc143-x86/include -DOPENSSL_LIBRARIES=C:/workarea/openssl-3.4.0.3-windows-msvc143-x86/lib/libssl.lib -DOPENSSL_ROOT_DIR=C:/workarea/openssl-3.4.0.3-windows-msvc143-x86 -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_FEATURE_openssl=ON -DQT_FEATURE_openssl_runtime=OFF -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_QSNPRINTF -DQT_NO_STD_FORMAT_SUPPORT -DQT_NO_USING_NAMESPACE -DQT_RANDOMACCESSASYNCFILE_QIORING -DQT_TYPESAFE_FLAGS -DQT_USE_NODISCARD_FILE_OPEN -DQT_USE_QSTRINGBUILDER -DQT_ZLIB_LIB -DQt6Sql_INCLUDE_DIR=C:/workarea/psql9.4.26-1_win32/pgsql/include -DQt6Sql_LIBRARIES=C:/workarea/psql9.4.26-1_win32/pgsql/lib/libpq.lib -DUNICODE -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WINDLL -DCMAKE_INTDIR=\"RelWithDebInfo\" -IC:\workarea\qtwin32-build\qtbase\src\corelib\Core_autogen\include_RelWithDebInfo -IC:\workarea\qtwin32-build\qtbase\include -IC:\workarea\qtwin32-build\qtbase\include\QtCore -IC:\workarea\qt\src\qtbase\src\corelib -IC:\workarea\qtwin32-build\qtbase\src\corelib -IC:\workarea\qtwin32-build\qtbase\src\corelib\global -IC:\workarea\qtwin32-build\qtbase\src\corelib\kernel -IC:\workarea\qt\src\qtbase\src\corelib\..\3rdparty\tinycbor\src -IC:\workarea\qtwin32-build\qtbase\include\QtCore\6.11.0 -IC:\workarea\qtwin32-build\qtbase\include\QtCore\6.11.0\QtCore -IC:\workarea\qt\src\qtbase\src\corelib\..\3rdparty\double-conversion\double-conversion -IC:\workarea\qt\src\qtbase\src\corelib\..\3rdparty\double-conversion -IC:\workarea\qtwin32-build\qtbase\src\corelib\.rcc -IC:\workarea\qt\src\qtbase\mkspecs\win32-msvc -IC:\workarea\qtwin32-build\qtbase\include\QtZlib -IC:\workarea\qt\src\qtbase\src\3rdparty\zlib -IC:\workarea\qtwin32-build\qtbase\src\3rdparty\zlib -IC:\workarea\qt\src\qtbase\src\3rdparty\pcre2\src /DWIN32 /D_WINDOWS /Zi /DNDEBUG -O2 -Ob3 -std:c++17 -MD /W3 /wd5105 -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:ternary -Zc:externConstexpr -Zc:wchar_t -bigobj -guard:cf -Gw /EHsc /d2FH4 /YuC:/workarea/qtwin32-build/qtbase/src/corelib/CMakeFiles/Core.dir/RelWithDebInfo/cmake_pch.hxx /FpC:/workarea/qtwin32-build/qtbase/src/corelib/CMakeFiles/Core.dir/RelWithDebInfo/cmake_pch.cxx.pch /FIC:/workarea/qtwin32-build/qtbase/src/corelib/CMakeFiles/Core.dir/RelWithDebInfo/cmake_pch.hxx /showIncludes /Foqtbase\src\corelib\CMakeFiles\Core.dir\RelWithDebInfo\io\qioring_win.cpp.obj /Fdqtbase\src\corelib\CMakeFiles\Core.dir\RelWithDebInfo\ /FS -c C:\workarea\qt\src\qtbase\src\corelib\io\qioring_win.cpp C:/workarea/qtwin32-build/qtbase/src/corelib/global/qconfig_p.h(128): warning C4005: 'QT_FEATURE_openssl': macro redefinition C:/workarea/qtwin32-build/qtbase/src/corelib/global/qconfig_p.h(128): note: 'QT_FEATURE_openssl' previously declared on the command line C:\workarea\qt\src\qtbase\src\corelib\io\qioring_win.cpp(22): error C2338: static_assert failed: 'This code is written with assuming 64-bit Windows.' [1329/12375] Building CXX object qtbase\src\corelib\CMakeFiles\Core.dir\RelWithDebInfo\thread\qfutureinterface.cpp.obj C:/workarea/qtwin32-build/qtbase/src/corelib/global/qconfig_p.h(128): warning C4005: 'QT_FEATURE_openssl': macro redefinition -
Building for 32bit on windows wasn't officially supported already for a long time and won't work at all since 6.11 as you can see from the error in qioring_win.cpp
-
Building for 32bit on windows wasn't officially supported already for a long time and won't work at all since 6.11 as you can see from the error in qioring_win.cpp
@Christian-Ehrlicher said in Building QT 6.11.0 for Win32 platform:
Building for 32bit on windows wasn't officially supported already for a long time and won't work at all since 6.11 as you can see from the error in qioring_win.cpp
@Christian-Ehrlicher Can you please point me to an official information on this so that I can satisfy my project team about this?