PDA

View Full Version : How to static compile Qt 5.9.1 with OpenSsl?



logancale2015
14th July 2017, 14:50
down vote
favorite


hello people i need your help

i have qt-opensource-windows-x86-5.9.1.exe installed qt-everywhere-opensource-src-5.9.1 and openssl-win32 1.0.2l installed to

so i want to do the statically caompilation with qt-everywhere-opensource-src-5.9.1 and activate openssl for this a i use this script: so please what is the modification of this part of the script that a i need to do for that:

configure.bat -static -release -platform win32-g++ -prefix %QtStaticDir% -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-odbc -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests"

thanks

high_flyer
14th July 2017, 14:56
well, logically it would be good to remove '-no-openssl ' option from the configure line.
'-static' is already in your line so that is ok.

Infinity
15th July 2017, 01:59
To ensure your application will link statically against OpenSSL (rather than loading it at run-time via `dlopen` or similar) you should add `-openssl-linked` to the configure arguments. And you should have a static build of the OpenSSL libs of course.

Which compiler do you use? If you use mingw-w64, here's a build script which also covers static configuration: https://github.com/Martchus/PKGBUILDs/blob/master/qt5-base/mingw-w64-static/PKGBUILD#L319

jaca
10th January 2019, 00:11
Is there a script for Windows?

anda_skoa
11th January 2019, 19:40
This is on Windows, see the ".bat" in the original posting.

Cheers,
_