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. Trouble Getting OpenSSL To Work On Mac
QtWS25 Last Chance

Trouble Getting OpenSSL To Work On Mac

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 586 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.
  • T Offline
    T Offline
    TheCRV
    wrote on last edited by TheCRV
    #1

    Hello and Happy New Year,

    I am porting an application over to my new Macbook Pro and I'm having trouble getting OpenSSL to work in QT. I'm using the latest version of Qt Creator and Qt 6.5.3 clang. Here is my code:

    In my .pro file:

    INCLUDEPATH += "$$PWD/openssl@3/3.2.0_1/include/openssl"
    
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/configuration.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/opensslconf.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/macros.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/types.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/core.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/core_dispatch.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/symhacks.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/bio.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/evperr.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/params.h
    LIBS += L"$$PWD/openssl@3/3.2.0_1/include/openssl" openssl/evp.h
    

    And in my .h file:

    #include <openssl/configuration.h>
    #include <openssl/opensslconf.h>
    #include <openssl/types>
    #include <openssl/core.h>
    #include <openssl/core_dispatch.h>
    #include <openssl/symhacks.h>
    #include <openssl/bio.h>
    #include <openssl/evperr.h>
    #include <openssl/params.h>
    #include "evp.h"
    

    I have tried adding the "-l" parameter before the files in my .pro file. I have tried just about everything I can think of. I want OpenSSL to do checksums for me. I know that this feature is built into Qt, but now I am wondering why I can't include these files in my .h file. I have installed OpenSSL 3.0 (or 3.2) from Homebrew, and I have copied them over to my working directory for ease of use. The top include line says that the file can't be found, when it is clearly there. Any help would be appreciated.

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

      Hi,

      1. unless you are developing within your homebrew installation (and if so, you really should not), your use of $$PWD is wrong. Use the full path.
      2. Either remove the openssl portion of the path from the INCLUDEPATH variable entry or from your include statements. I would recommend the former.
      3. Your LIBS line do not make sense. This variable is to add library search paths (i.e. -L and you are missing the -) and libraries with -l which you are not doing.

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

      T 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        1. unless you are developing within your homebrew installation (and if so, you really should not), your use of $$PWD is wrong. Use the full path.
        2. Either remove the openssl portion of the path from the INCLUDEPATH variable entry or from your include statements. I would recommend the former.
        3. Your LIBS line do not make sense. This variable is to add library search paths (i.e. -L and you are missing the -) and libraries with -l which you are not doing.
        T Offline
        T Offline
        TheCRV
        wrote on last edited by
        #3

        @SGaist Thank you for your response. My problem has been solved.

        1 Reply Last reply
        0
        • T TheCRV has marked this topic as solved on

        • Login

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