QT build statically with statically linked psql
Unsolved
Installation and Deployment
-
Hi!
I've configured my qt statically on MacOS 11.5 (BigSur) using qt 5.15.2
./configure -prefix ~/opt/qt5 -static -nomake tests -nomake examples -skip qtwebengine -opensource -release -sql-psql
It works but libpq links as a shared library
/usr/local/opt/postgresql/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.13.0)
Is it possible to include libpq to a build as a static dependency? How can do that?
-
Hi and welcome to devnet,
For that you need a static PostgreSQL library.
-
@SGaist thanks for reply! I have libpq.a file that is a static psql library. I also deleted the dynamic version. But qt still trying to find the dynamic version and ignores the static one. How can I specify the static version to be used?
-
If you removed the dynamic one, how does it still find it ?
You can modify the .pro file and pass the complete path to the static library