views:

26

answers:

1

Hello all,

I'm having a problem compiling files in Visual Studio 2008 (Express edition). I have two folders with an Entity.cpp file in them, they're both added to the solution but only the first is compiled.

If I change the name of either one of them it compiles correctly, but if both have the same name they're ignored. (Though changing included headers does make it try to recompile.. but it says no relevant changes are detected and linking errors still happen)

Thanks in advance!

A: 

The problem with Visual Studio is that Folders and Filters are not related.

You say that they are in different Folders (physically, on your disk), but are they in different Filters in your solution?

I don't remember having any problem of this kind, but I sure got kicked more than once because I had not put the file in the solution...

Matthieu M.
They are in different folders (on the filesystem) and in different filters (in visual studio), I can even open them both by doubleclicking on the files in the solution explorer. But it doesnt compile the second (Linker errors referencing things)
Yourdoom
Aah, I think I've found the problem... Every file is compiled separately and the object file is stored in the same directory.. so there is an Entity.obj created for the first file, and then it trys to make one for the second.. which fails so its skipped. I guess I'll rename it to something else...
Yourdoom