0

I am running Linux Mint 18.3 and QtCreator (Qt version 5.15 installed from Qt installer download from Qt site, not repository binaries for the distrubution) and developing a C++ GUI application. Because of the openSSL mismatch between native Mint SSL version and that used by Qt5.12 onwards, I have installed the OpenSSL1.1.1d binaries via the Qt Maintenance Tool and have explicitly added these libraries to my application project.

Without this step nothing works. With this step, my application runs successfully when initiated WITHIN QtCreator, but not when I just run the binaries outside of it.

I know that I must be missing something simple here, but what is QtCreator doing that enables access to SSL? I have tried creating simlinks to these libraries (libcrypto.so.1.1 and libssl.so.1.1) locally within the binary directory but this has no effect.

I would like to be able to run my application without having to do so inside of QtCreator but so far I can find no workaround to allow this. Can anyone suggest what I am missing?

I can confirm that the output of calls to my QSslSocket::sslLibraryVersionString() function are returning empty string and "OpenSSL 1.1.1d" respectively, so I am convinced this is a runtime linking problem.

mathematician1975
  • 21,161
  • 6
  • 59
  • 101
  • Did you include openssl with -L or -l into LIBS in your project file? EDIT: You need to have something similar to [this question](https://stackoverflow.com/questions/39480724/use-openssl-in-qt-c) – Maxim Skvortsov Aug 19 '20 at 17:16
  • @MaximSkvortsov Yes the project file is not the problem. I have found a solution - it looks like when launching through QtCreator, QtCreator is modifying LD_LIBRARY_PATH so that these libraries can be found. Obviously when running the exe from console, this is not happening. If I alter LD_LIBRARY_PATH in the same way, the application runs without error and picks up tht 1.1.1d libraries. – mathematician1975 Aug 20 '20 at 10:03

0 Answers0