Important: Please read the Qt Code of Conduct -

OpenSSL libs not found on compilation

  • Hi

    I'm trying to use the Smtp client from in my project. I first installed openSSL 64bits and created a CSR. I have also include the path in my environment variables PATH.
    I have linked the 2 libs "libeay32" and "ssleay32" to my project, but when I compile it says it cannot find -llibeay32 and -lssleay32.

    I have included the 2 libs using the Qt tool to be sure there's no syntax error, so the include looks like this in my .pro file:

    unix|win32: LIBS += -L$$PWD/C:/OpenSSL-Win64/lib/ -lubsec

    INCLUDEPATH += $$PWD/C:/OpenSSL-Win64/include
    DEPENDPATH += $$PWD/C:/OpenSSL-Win64/include

    unix|win32: LIBS += -L$$PWD/C:/OpenSSL-Win64/lib/ -lssleay32

    INCLUDEPATH += $$PWD/C:/OpenSSL-Win64/include
    DEPENDPATH += $$PWD/C:/OpenSSL-Win64/include

    I'm using Qt5.5 on Windows 7 64 bits.

    Does anyone have an idea how to solve it pls?

  • Lifetime Qt Champion


    Why do you have $$PWD before C:/ ?

  • Hi SGaist

    Qt put it automatically, I have removed and now it seems to compile; but after compilation I have another error now, in a popup window:
    Executable Failed: During startup program exited with code 0xc000003b

  • Lifetime Qt Champion

    Probably not finding the OpenSSL dlls when running. Go to the Run part of the Project panel and edit the PATH environment variable there. Add the path to where the OpenSSL dlls can be found and re-run the application.

Log in to reply