Statically link a Qt program?
Unsolved
General and Desktop
-
Is it possible to statically link a Qt application?
I tried adding -Bstatic but that just gives errors:
/usr/bin/ld: cannot find -lQt5Widgets /usr/bin/ld: cannot find -lQt5Gui /usr/bin/ld: cannot find -lQt5Core /usr/bin/ld: cannot find -lGL /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status
-
You cannot link a Shared Library statically.
To link Qt statically, you have to compile a static version for your OS.
here is a detailed description how to do this.