Where to store moc_ and qrc_ generated files
-
I'm currently designing a procedure for automating the moc, uic and rcc steps when building Qt applications with Visual Studio Express (doesn't support the plug-in). I have a simple question: why should the generated moc_ and qrc_ .ccp files have to have separate debug and release versions stored in the 'debug' and 'release' directories when (in my experience) a comparision shows the two version to be identical?
-
It's a Windows thing, where qmake uses separate directories for debug and release builds. On other platforms, all files are stored in the same place (unless, of course, you specify otherwise in .pro file). You can force output dir just as ludde suggested (probably. I'm a Linux person. It definitely workse here).
-
I have had further thoughts about the conclusion reached above. Qt projects on Windows generated by qmake (or QtCreator) produce two preprocessor DEFINE lists differing by one entry; the 'release' version includes QT_NO_DEBUG and the 'debug' version does not. So theoretically it is possible that the use, or not, of this directive in a header file containing a Q_OBJECT reference could result in two differing moc_xxx.cpp files. Such a case must be extremely rare but clearly must be allowed for in generally available apps like qmake and QtCreator. Maintaining two project source collections is very inconvenient and I intend to ignore the problem.
As forums are a geat source of trouble shooting info I thought that submitting this new conclusion would be useful. Thank you.