Reputation: 8033
Looking at the libs (:/Qt/5.11.0/5.11.0/gcc_64/lib/
) of Qt5.11.0, I was wondering which one was linking openssl. So I ran the following:
for lib in `ls *.so`; do ldd $lib | grep ssl; done
And I got no output, suggesting that none of the libraries are linking against openssl. But I believe that Qt must link against it somehow (e.g. for networking).
How is the linking done? And where does it look for openssl? Do I have a way to know which one Qt found on my system (e.g. given I have multiple ones)?
Upvotes: 2
Views: 799
Reputation: 8033
Qt links some libraries dynamically at runtime. In order to see which libraries are loaded, one can check the diagnostic output of the dynamic linker, as hinted by Matteo:
Say my executable is called QGroundcontrol
:
On Linux:
LD_DEBUG=libs ./QGroundcontrol 2>&1 | grep -E "ssl|crypto"
On macOS:
DYLD_PRINT_LIBRARIES=1 ./QGroundcontrol 2>&1 | grep -E "ssl|crypto"
From this I could see that Qt finds openssl on the system.
Now, I still don't know how I can tell Qt to look somewhere else (in case I want to link another openssl), but that's another question.
Upvotes: 1