PDA

View Full Version : in-source-build?



Perduta
21st April 2012, 19:46
I kind of gave up trying to work out why some header files are found and others not found running cmake from the command line... so back to Qt Creator:

It says "Qt Creator has detected an in-source-build in ... which prevents shadow builds... clean your source directory."

- Why can't it just rebuild the software?
- How do you "clean" a source directory?

ChrisW67
21st April 2012, 22:02
Why can't it just rebuild the software?
Probably because the unrelated intermediate files scattered through the source would get found at the same time as the equivalent files in a shadow build area potentially leading to failed compilation/linking.

How do you "clean" a source directory?
You remove all the intermediate and result files from the compilation, i.e. *.o, *.obj, *.dll, *.exe, moc_*, ui_*.h etc. Typically two level of cleanliness: "clean" which prepares for another identical build, and "distclean" that removes everything including the Makefiles in preparation for distribution of source.


// For the Qt SDK using MingW
mingw32-make distclean
// or, for the Microsoft compilers
nmake distclean
// or, for Linux
make distclean

from the top directory of the source should do it.