Qt Static build?
OS: Windows 7 64-bit
Env: MS VS 2015 Update 3
I'm trying to setup QT for static building but the guide (link above) is out of date, even the powershell script referenced on it is not working. I tried updating the script but didn't help. Also, tried googling, came across a couple of blogs but each had its own series of steps, and those didn't help much either.
Can anyone please share the proper powershell script (preferrably one that uses jom for faster compilation) or straightforward list of steps?
@Taytoo The page you mentioned is for the MinGW compiler, while you seem to have the Microsoft compiler. Also,
jomis not supported with MinGW, while it is with MSVC.
@aha_1980 Where can I find instructions for MSVS?
Btw, I did try msvs instructions I found on a blog (http://amin-ahmadi.com/2016/09/22/how-to-build-qt-5-7-statically-using-msvc14-microsoft-visual-studio-2015/) but those didn't work either. Hoping to find straightforward instructions to get this done asap.
Where can I find instructions for MSVS?
Wiki link for MSVC is here https://wiki.qt.io/Building_Qt_Desktop_for_Windows_with_MSVC ( was last modified on 9 November 2017, at 12:09)
Take a look at
vcpkg, Microsoft's C++ library manager. It can build Qt with all of its prerequisites from scratch. I was able to build a static version on Windows.
@sterin I don't see any Qt instructions on the github page?
Qt is just one package out of many. Read and follow from Quick Start until Example 1: Using Sqlite. Then build Qt using:
.\vcpkg install qt5-base
There are some choices to be made, such as whether you want to link statically or dynamically with the VC runtime, etc.