qmake
generates Makefile
according to mkspecs
, gcc does linking according to instruction in Makefile
, inspect Makefile
to verify that linking instructions are correct.
As far as I know binaries does not contain path to linked libraries, only library names, so only way for ldd
to know exact path is to look for libraries in $PATH
variable, which means that ldd
can lie to you if $PATH
during compilation is different from the $PATH
during executing ldd
.
Another way to put it: when ldd
says app is linked to libQt6Widgets.so.6
- it is a fact, but when it says libQt6Widgets.so.6
is /lib/x86_64-linux-gnu/libQt6Widgets.so.6
- it's a guess.