Please I wanna know the order in which these building tools are called in QT prjects :
The UIC - The MOC - The RCC - The preprocessor - The normal c++ compiler (e.g Gcc)
First step :
UIC process the *.ui files and produce *.h outputs MOC process the .h files (those with Q_OBJECT macro) and produce moc_.cpp files RCC process the *.rc files and produce *.cpp files
Second step :
All your writed .h/.cpp files and all the generated .h/.cpp files are processed as "normal" source code by your "normal" compiler.
For a complete answer, you should know that qMake create dependencies between these files. For example if "foo.h" file contain the "Q_OBJECT" macro, MOC will produce "moc_foo.cpp" file. But qMake will add a dependency : "moc_foo.cpp" will be marked as dependent on "foo.h". So, if you modify "foo.h" file, your compiler knows that MOC should be re-run on this file to produce the new version of "moc_foo.cpp"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With