how to compile qt static with open ssl
-
Here is a solution and feedback to the people searching in future for same issue using openssl 1.1.1+ and at
guys the problem is as follows:
1- to compile it as static, you must use -openssl-linked parameter
2- but we think normally because we use the following parameters config will find the libraries.
-I %OPENSSL_HOME%\include -L %OPENSSL_HOME%\lib
but although these parameters are configured but config does not find the libraries and prints out the following error. It seems that these parameters are necessary only to find the header files and not to find the librariesNone of [libssl.dll.a libssl.a ssl.dll.a ssl.a ssl.lib] found in [] and global paths. None of [libcrypto.dll.a libcrypto.a crypto.dll.a crypto.a crypto.lib] found in [] and global paths.
The solution to this is to add the path of these static libraries and openssl binary into your global PATH variable, this way it will find the .a libraries. I used Openssl 1.1.1
do the following for a quick test
where libssl.a
where opensslif you get an output, so you can be sure it will work.
-
@SherifOmran said in how to compile qt static with open ssl:
PATH
If you really need to change that variable, then do it only in the terminal you use to build your stuff. It's never a good idea to add the path to such sensitive libraries system wide as you might break unrelated applications.