For Visual Studio: make sure all file names are unique. The compilation result of dir/file.cpp will be obj/file.obj . When the compiler compiles otherdir/file.cpp , the result will be obj/file.obj - the previous object file will be overwritten . This applies to VS 2008 and earlier, and I suspect that this is still in VS 2010.
I also organize the source code like you do. I ended up using the following naming scheme: if the path to the source file is Dir/Subdir/AnotherSubDir/File.cpp , I would name the file Dir/Subdir/AnotherSubdir/DirSubdirAnotherSubdirFile.cpp . Nasty? Yes. But it is superior to a project that will not link, and it is easy to understand what should be the name of the file. I think you could just add a serial number to the file, but I thought it would be uglier. In addition, if you forgot to make the file name unique, the error is not so obvious. Especially when you are tired and your fiance / wife is waiting ...
Jörgen sigvardsson
source share