ustulation
14th August 2012, 11:49
hi, (this question may be more about Visual Studio but as i'm using it in conjunction with Qt and a few other posts contain questions on Visual Studio also, i took the liberty of posting this here)
i've the following in the custom build property of every header file that uses Q_OBJECT:
Command Line: $(THIRDPARTY_DIR)\qt\4.7.0\win32-vc10\bin\moc.exe $(InputFileName) -o moc\$(ConfigurationName)\moc_$(InputName).cpp
Description: ################### moc'ing $(InputFileName)
Outputs: moc\$(ConfigurationName)\moc_$(InputName).cpp
This generates the necessary moc files. I now want to ask visual studio to compile and link these too to my other source files. Presently i'm using
#include "moc\{Release OR Debug}\moc_Whatever.cpp" these statements in any of the files to force compilation and linking. Evidently i have to keep changing my #include according to debug or release build (i cannot discard $(ConfiguarationName) during moc file generation above for reasons). Plus i dont like the idea of writing this #include in the source files just for the purposes of compilation and linking.
Is there any build step in properties anywhere where i can mention what files will be generated in future and to compile and link them when they are available (VS2005)?
(i cannot use QtPlugin right now)
i've the following in the custom build property of every header file that uses Q_OBJECT:
Command Line: $(THIRDPARTY_DIR)\qt\4.7.0\win32-vc10\bin\moc.exe $(InputFileName) -o moc\$(ConfigurationName)\moc_$(InputName).cpp
Description: ################### moc'ing $(InputFileName)
Outputs: moc\$(ConfigurationName)\moc_$(InputName).cpp
This generates the necessary moc files. I now want to ask visual studio to compile and link these too to my other source files. Presently i'm using
#include "moc\{Release OR Debug}\moc_Whatever.cpp" these statements in any of the files to force compilation and linking. Evidently i have to keep changing my #include according to debug or release build (i cannot discard $(ConfiguarationName) during moc file generation above for reasons). Plus i dont like the idea of writing this #include in the source files just for the purposes of compilation and linking.
Is there any build step in properties anywhere where i can mention what files will be generated in future and to compile and link them when they are available (VS2005)?
(i cannot use QtPlugin right now)