Skip to content

Instantly share code, notes, and snippets.

@stychos
Created January 20, 2019 07:48
Show Gist options
  • Save stychos/964f22758b4483f3c57acf5877dbf2dd to your computer and use it in GitHub Desktop.
Save stychos/964f22758b4483f3c57acf5877dbf2dd to your computer and use it in GitHub Desktop.
Qt 5.6.3 + MSVC 2017 + OpenSSL 1.0.x (WinXP static build support)
0. Install Visual Studio 2017 (Community Edtion or whatever), select "Windows XP support".
1. Download and unpack OpenSSL 1.0.x sources and prepare build. Mind the paths.
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
set PATH=C:\Jom;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
set LIB=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%
set CL=/D_USING_V110_SDK71_
2. Compile OpenSSL.
cd C:\OpenSSL\Src\1.0.2q
perl Configure VC-WIN32 no-asm no-async --prefix=C:\OpenSSL\1.0.2q --openssldir=C:\OpenSSL\1.0.2q
ms\do_nt
notepad ms\nt.mak => add -D_USING_V110_SDK71_ -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" -DPSAPI_VERSION=1 to CFLAG
nmake -f ms\nt.mak install
3. Compile Qt.
cd C:\Qt\5.6.3\Src
set INCLUDE=C:\OpenSSL\1.0.2q\include;%INCLUDE%
set LIB=C:\OpenSSL\1.0.2q\lib;%LIB%
set OPENSSL_LIBS="-LC:/OpenSSL/1.0.2q/lib -llibeay32 -lssleay32 -lgdi32"
configure -prefix C:\Qt\5.6.3\msvc2017-static -static -static-runtime -target xp -platform win32-msvc2017 -debug-and-release -qmake -opensource -nomake examples -no-compile-examples -nomake tests -qt-pcre -no-icu -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -qt-zlib -qt-libpng -opengl desktop -no-directwrite -I "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" -L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -I C:\OpenSSL\1.0.2q\include -L C:\OpenSSL\1.0.2q\lib -openssl -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32 -lgdi32"
jom
jom install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment