- Example with Qt 5.15.0
- Using MSVC and VS2019
- TODO: Add more details about
configure
- TODO: jom notes.
Prerequisites:
Download Qt source zip from https://www.qt.io/offline-installers
Extract, e.g. to C:\Qt\qt-5.15.0-src
Run x64 Native Tools Command Prompt for VS 2019
cd C:\Qt\qt-5.15.0-src
mkdir ..\qt-5.15.0-static
set QTDIR=C:\Qt\qt-5.15.0-src\qtbase
set PATH=C:\Qt\qt-5.15.0-src\qtbase\bin;%PATH%
configure -debug-and-release -prefix "C:\Qt\qt-5.15.0-static" -opensource -platform win32-msvc -opengl desktop -static -static-runtime -nomake examples -nomake tests
nmake
nmake install
Some documentation for configure
is at https://doc.qt.io/qt-5/configure-options.html
Install the Qt VS Tools extension https://marketplace.visualstudio.com/publishers/TheQtCompany
In Visual Studio Extensions -> Qt VS Tools -> Qt Options
, add C:\Qt\qt-5.15.0-static
and make it the default.
If working on an existing project, make sure to update Qt Installation
in Extensions -> Qt Project Settings
Using windows 7,
Which is supposedly supported according to this image from this link https://doc.qt.io/qt-5/supported-platforms.html
Build & install successful, but when i try to launch bin/qml.exe, i get some missing library error, upon closer inspection i discovered it uses D3D12SerializeRootSignature function which is part of directx 12 which is not supported by windows 7. Oops.
Is this solveable by inputing smth fancy into 'configure' command to force directx11 compatibility ? (or in general, windows 7 compatibility)
Maybe -platform and then add one of those ?