Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
compile Qt from repository using linux
QT-static-prgm last edited by
i want to compile Qt from source multiple times.
I found this tutorial: http://doc.qt.io/qt-5/linux-building.html
But i'd prefer to download from a git repo, because i want to download and compile it within a script.
Furthermore how would i clean and rebuild?? As far as i remember confclean is no more possible.
You can use the instructions above in a script... but anyway, since you ask for git repo, here is a guide especially for that use case: https://wiki.qt.io/Building_Qt_5_from_Git
If you want to build several times from the same source code, simply run configure and make in another folder. Example:
# Let's assume you have Qt source code in folder qt-src mkdir qt-build1 cd qt-build1 ./../qt-src/configure -prefix $PWD make # Now rinse and repeat for your other builds cd .. mkdir qt-build2 cd qt-build2 ./../qt-src/configure -prefix $PWD make
If you want to keep all the build artifacts away from results (include files and libraries), you need to point
-prefixto yet another directory. And you will have to run
make installafter compilation is done, so that the build system has a chance to copy the libs to your prefix folder.