- 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
Do you know how to to build qt 6.3.1?