Question

Is there a way to add multiple files having the same name to a single Visual Studio 2005 project ? I want my files to have the same name as my classes. Namespaces avoid naming conflicts, but the problem remains for file names. I could prefix each file with the namespace "path" but that would get ugly. Is there a way to use folders (i'm not talking about filters) with VS 2005 ?

Thanks for your help :)

Was it helpful?

Solution

Of course there is - just put the file into the desired folders on disk.

Unfortuantely, that's not all there is to it. You also have to change the file's object location (or name) - because by default, VS dumps all object files from a project into one directory, regardless of where they were on disk originally. The object file location for a source file is accessed through that source file's properties. Go to Properties > C/C++ > Output Files > Object File Name.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top