title: Object file location of Visual Studio C++ project
body: <p>In our project, the directory structure of our source code files are linked with our namespaces. E.g., a class Util which belongs to the namespace MyNamespace_A would be implemented in the file
  .../MyNamespace_A/Util.cpp</p>
  
  <p>Now, the namespace 'OtherNamespace::SubNamespace' should also have a Util class. It should be implemented in the file
  .../OtherNamespace/SubNamespace/Util.cpp</p>
  
  <p>Without specifying an explicit object file (Properties of the .cpp file -> C/C++ -> Output Files -> Object File Name) this will lead to problems because two object files will have the same name and by default, they are stored in the same directory (which is '$(IntDir)').</p>
  
  <p>Is there an automatic mechanism which lets me specify that the directory structure of the output files shall be the same as the structure of the source code directories?
  Can I solve the problem in a different way than specifying the object file name for each of my source code files?</p>