[Qt-creator] Compile a single .cpp file?

christian at hoenig.cc christian at hoenig.cc
Wed May 27 12:26:48 CEST 2009


Hi, 

> Actually, your build system should care about this and only compile the
> files which have been changed.
> Obviously linking needs to be done at the end.

Yes, you're right, but I think the idea is not to compile anything else then 
the currentcly opened .cpp. /Me is missing this feature, too ;-).

This is very useful for example when you are refactoring and loads of your 
files don't compile. A simple make won't do in that case. But you can compile 
the one file you are currently fixing (and the included ones, too).

A workarund is the following: 
As qmake generates Makefiletargets for all .o files, you can call 
	make -f Makefile.Debug path/to/currentfile.o
to build this file only.

So if anybody want's to implement this feature, he would make me happy, too 
;-)

take care, have fun
/christian



More information about the Qt-creator-old mailing list