Build,run qmake,run,rebuild,clean options for projects in QtCreator
Moved
Solved
Qt Creator and other tools
-
Hi all,
I want to know about the difference between these options available such as Build, run qmake, run, rebuild clean options when you right-click on the project.
-
OK this will take some explaining :-)
In order to run an application if you only have code, these are the necessary steps:
- qmake - creates build instructions for the build system (
make
ornmake
) - build - this compiles the source code and links it into a binary executable (by calling
make
). Build artifacts (object files, make files, debug symbols) are generated here and left in place - to speed up future builds (incremental builds) - run - this simply instructs the Operating System to execute your application (same thing happens when you double-click an
.exe
file in file browser)
Now, in Qt Creator here is what menu actions do:
- Build - this will run
qmake
if necessary, then runmake
(compile & link the executable) - Run qmake - this will only run
qmake
(generateMakefile
s) but it will not proceed with compilation - Run - this will run
qmake
andbuild
if necessary, then run (execute) your application - Rebuild - this will
clean
, then runqmake
thenbuild
- Clean - this will clean up the build artifacts (Makefile, object files, debug symbols, MOC, UIC files etc.) leaving the build directory clean
I hope this makes it a bit more clear. If not, please ask more :-)
- qmake - creates build instructions for the build system (