How to Include OpenSSL in a Qt project

前端 未结 5 1078
旧时难觅i
旧时难觅i 2020-11-27 17:00

I\'m new to Qt, I\'ve done some Googleing and can\'t find a detailed enough answer.

I need to use OpenSSL in my qmake-based Qt project. How do I go about downloading

5条回答
  •  臣服心动
    2020-11-27 17:48

    I was working on Win 7 (32) with Qt5.5, and non of these answers worked for me.
    So I just want to share a solution that finally worked:

    1. I have OpenSSL installed in C:\OpenSSL-Win32
    2. In c:\OpenSSL-Win32\MinGW there are two library files:
    libeay32.a & ssleay32.a
    3. I've made a copy of each of them an renamed the extensions:
    libeay32.a -> libeay32.lib & ssleay32.a -> ssleay32.lib
    4. I linked libraries in my .pro file this way:
    LIBS += -LC:/OpenSSL-Win32/lib/MinGW -llibeay32
    LIBS += -LC:/OpenSSL-Win32/lib/MinGW -lssleay32
    INCLUDEPATH += C:/OpenSSL-Win32/include
    5. I copied 3 .dll files from C:\OpenSSL-Win32:
    (libeay32.dll, libssl32.dll, ssleay32.dll)
    to my build/debug folder:
    (build-XXXXX-Desktop_Qt_5_5_1_MSVC2012_32bit-Debug/debug)

    I hope this will help.

提交回复
热议问题