0

I have an old Qt project I would like to compile for a local use, and it need an external library: openssl, the old v1 version.

I have installed the package, and the extension is stored in /usr/lib/x86_64-linux-gnu, I can see the .so file and the correct linking:

libssl.so -> libssl.so.3

However, as you can see it, it is a more recent version of the library that the one actually needed in my project. Therefore I got the older version and put it in /usr/local/lib.

The compilation fails, because of the "too recent" version of the library. If I remove it, it succeeds because Qt seems to fallback in the other folder and take the older one.

My issue is that I need both versions, the most recent one by default, and the older one just to compile this project.

I did not manage to tell Qmake to try first the old version. In Qt, I tried to add the library as an external one, but the most recent version is still used. I also tried manually after reading some posts here, here and here or here.

I noticed that each post and the Qt assistant use the += operator, which might cause that this override is not taken into account because the default library has already been found?

I use Qt 5.9.9.

enrico69
  • 232
  • 2
  • 9
  • IIRC Qt uses pkg-config to find OpenSSL on Linux. You may want to put OpenSSL1 .pc file path before OpenSSL3 in `PKG_CONFIG_PATH`. – Osyotr May 24 '23 at 20:11

0 Answers0