Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to compile qt static with open ssl
Forum Updated to NodeBB v4.3 + New Features

how to compile qt static with open ssl

Scheduled Pinned Locked Moved Unsolved General and Desktop
compiler errorstaticopenssl
22 Posts 3 Posters 16.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by SherifOmran
    #21

    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 libraries

    None 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 openssl

    if you get an output, so you can be sure it will work.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #22

      @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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved