Details
Description
A simple example of a source file directory structure:
client/MyWidget.cpp
server/MyWidget.cpp
Normally, VS2010 outputs all object files to the same intermediate directory $(IntDir) like so:
obj/MyWidget.obj
obj/MyWidget.obj
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:
obj/client/MyWidget.obj
obj/server/MyWidget.obj
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.
Attachments
Issue Links
- relates to
-
QTVSADDINBUG-113 Variable for intermediate directory does not work in paths for moc, uic and rcc. $(IntDir) (VS 2010)
- Closed
-
QTVSADDINBUG-424 CONFIG += object_parallel_to_source no_batch is ignored
- Closed
-
QTVSADDINBUG-393 Use any macro defined in vsprops for the moc output directories
- Closed