0
votes

I followed the instructions for the Qt static build as described in https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW. Running the script on my Windows 10 machine just works fine and builds Qt statically. However, since I require OpenSSL support I can not compile my program with the static build produced from the .psscript.

Therefore, I slightly changed the configure.bat options of the .ps script from -no-openssl to

-openssl-linked 
-I C:\OpenSSL-Win32\include 
-L C:\OpenSSL-Win32\lib\VC\static 
OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32 -lCrypt32"             
OPENSSL_LIBS_DEBUG=-"lssleay32MTd -llibeay32MTd" 
OPENSSL_LIBS_RELEASE="-lssleay32MT -llibeay32MT

to enable OpenSSL support in a static Qt build, based on the anwseres from:

QT https SSL support for static QT static program build - getting 'Protocol "https" is unknown'

and

Is there any way to building static Qt with static OpenSSL?

Running the script now produces not further specified errors in the make install steps. The -lUser32 -lAdvapi32 -lGdi32 -lCrypt32 libs are not in any subfolder of my OpenSSL-Win32 installation but can be found in C:\Windows\System32\.

1
If you just remove -no-openssl it will revert to the default, which is use the platform provided SSLdtech

1 Answers

0
votes

I interpret the question as:

How can I build Qt static from source enabling OpenSSL support at the project installation target?

One of possible ways is:

  • Static Qt build: configure -static -debug-and-release -openssl -I %OPENSSL_HOME%\include -L %OPENSSL_HOME% and more options
  • Link the project executable with same SSL at %OPENSSL_HOME%
  • Distribute the corresponding libeay32.dll and ssleay32.dll altogether with the rest of executables