A simple example of a source file directory structure:
Normally, VS2010 outputs all object files to the same intermediate directory $(IntDir) like so:
Obviously this is a problem since the first object file is overwritten by the second. The standard way to resolve this is to change "Object File Name" in "Configuration Properties -> C/C++ -> Output Files" from the default "$(IntDir)" to "$(IntDir)/%(RelativeDir)/", which gives this:
Problem solved. Unfortunatly, the Qt Addin suffers from similar problems. moced source files are output to the same directory. Changing MocDirectory to ".\GeneratedFiles\$(ConfigurationName)%(RelativeDir)" doesn't resolve the problem. mocced source files are output with their directory structure intact, i.e. "GeneratedFiles/client/moc_MyWidget.cpp", but the second MyWidget.cpp file is not mocced, and "%(RelativeDir)" isn't expanded by ClCompile.
|For Gerrit Dashboard: QTVSADDINBUG-105|
|207391,6||Fix moc output filename clashes||2.1||qt-labs/vstools||Status: MERGED||+2||0|
|207594,4||Redesign moc step for cpp files to allow generic macro expansion||2.1||qt-labs/vstools||Status: MERGED||+2||0|