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. OpenSSL link issues
QtWS25 Last Chance

OpenSSL link issues

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 2.0k Views
  • 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.
  • Cobra91151C Offline
    Cobra91151C Offline
    Cobra91151
    wrote on last edited by
    #1

    Hi! I want to link app to OpenSSL libraries. The problem is, it displays the following errors:

    qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    

    .pro

    win32 {
        contains(QMAKE_TARGET.arch, x86_64) {
           INCLUDEPATH += "C:\\Program Files\\OpenSSL-Win64\\include\\openssl"
           LIBS += -L"C:\\Program Files\\OpenSSL-Win64\\lib" -llibeay32
           LIBS += -L"C:\\Program Files\\OpenSSL-Win64\\lib" -lssleay32
        } else {
           INCLUDEPATH += "C:\\Program Files\\OpenSSL-Win32\\include\\openssl"
           LIBS += -L"C:\\Program Files\\OpenSSL-Win32\\lib" -llibeay32
           LIBS += -L"C:\\Program Files\\OpenSSL-Win32\\lib" -lssleay32
        }
    }
    

    How to fix those issues? Thanks in advance.

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

      Hi,

      Why are you trying to link your application with OpenSSL ?

      The error message you are seeing comes from the fact that your application can't find the OpenSSL .dll files at run time.

      You should go to the Run part of the Project panel and modify the PATH environment variable to add the folder where the OpenSSL dlls for your compiler can be located.

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

      Cobra91151C 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Why are you trying to link your application with OpenSSL ?

        The error message you are seeing comes from the fact that your application can't find the OpenSSL .dll files at run time.

        You should go to the Run part of the Project panel and modify the PATH environment variable to add the folder where the OpenSSL dlls for your compiler can be located.

        Cobra91151C Offline
        Cobra91151C Offline
        Cobra91151
        wrote on last edited by Cobra91151
        #3

        @SGaist

        Thanks, but it will only be available to compiler, how to copy/link/include these libraries automatically to files directory?

        1 Reply Last reply
        0
        • Cobra91151C Offline
          Cobra91151C Offline
          Cobra91151
          wrote on last edited by
          #4

          The problem was that I didn't copy these libraries to executable directory. Now it's working.

          1 Reply Last reply
          0

          • Login

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