How can I specify WinXP MSVC platform toolset when building Qt from source?
Solved
Installation and Deployment
-
I am building Qt 5.10.1 from source and wish to specify the "vs141_xp" platform toolset to make the libraries and my programs Windows XP compatible. How can I do this?
The way I currently build Qt is from the VS 2017 x86 Native command prompt like this:
configure -prefix d:\qt5101 -release -optimize-size -strip -static -static-runtime -mp -silent nmake nmake install
Thanks
-
So the solution to this is to download and install:
- Visual Studio 2017
- Qt 5.6.3 sources
- Perl 5.12
- Python 2.7
- Ruby 1.9
- Win-Flex/Bison
Start the VS2017 x86 command line prompt, then step into qt\5.6.3\src and configure and build f.ex. like this:
configure -prefix path\to\qt\5.6.3\vs2017-xp32-static -release -static -static-runtime -target xp -strip -mp nmake nmake install
You should now have a new kit called "vs2017-xp32-static" that will produce binaries compatible with WinXP 32-bit, which are stand-alone without dependencies.
If you only need basic Core and GUI functionality, then step into src\qtbase and build from there instead.
Good luck