Page 1 of 1

C++ Visual Studio File Layout

Posted: Sat Mar 20, 2010 8:23 pm
by Live-Dimension
As any VS user knows, the projects folders really are only 'filters'. This is fine, except there's no way to make them act like how I want it to on the hard drive unless its manually done. What I mean is that I can add folders under "source files" and add an item there, but on the hard drives its all under one big folder, same as the includes. Now, I can of course put said file anywhere I want relative to the project, so in the solution explorer, I can have

Header Files
-- Graphics
---- drawsprite.h

Source Files
-- Graphics
---- drawsprite.cpp

And on the Hard drive I can make it like

$(ProjectDir)/inc/graphics/drawsprite.h
$(ProjectDir)/src/graphics/drawsprite.cpp

That's all fine, if a tad annoying. However, say I want to move drawsprite.cpp/.h to
$(ProjectDir)/src/graphics/sprite/drawsprite.h
$(ProjectDir)/src/graphics/sprite/drawsprite.cpp

It's my belief that the filters should reflect the folder layout because of includes. #include "graphics/sprite/drawsprite.h" is alot better then simply #include "drawsprite.h". To keep this layout intact, I first have to remove the files from the project, create said folders, move files, create said filters, then re-add the items to the filter, and finally fit any c++ includes. It's like it's intentionally a pain. Why can't we just map filters to a folder and be done with it? Yes, I realise there's a "Show All Files" view, but how many people use it? It also shows alot of "crap" I don't want to see. There seems to be no way to make a project remember to set to "view all files" on startup. Is there some addon or option that lets me add, move, and delete files/folder in the filter view while doing the same to the hard drive?

edit:
In the help files, I find this...
Note:
Solution Folders are an organizational tool in Solution Explorer; corresponding Windows folders are not created. We recommend that you organize your projects on disk in the same way that you organize them in the solution.
Well.... Can't you do that automatically? bleh!

Re: C++ Visual Studio File Layout

Posted: Sat Mar 20, 2010 8:35 pm
by GroundUpEngine
This is one of the many reasons :nono: why I switched to Code::Blocks, although I do use VS when I'm not on my PC :)

Re: C++ Visual Studio File Layout

Posted: Mon Mar 22, 2010 9:18 am
by Falco Girgis
Agreed. In my opinion, one of the very few flaws with Visual Studio. I've used a wide array of IDEs (DevC++, CodeWarrior, NetBeans, Eclipse, XCode, Code::Blocks), and I still come back to Visual Studio 2008 as (imho) the best compiler out there. The vast array of options and configurations mixed with the absolute best debugging that I have ever seen is unbeatable.

Hop on a Mac and try XCode. You'll be crying to get Visual Studio back.

Re: C++ Visual Studio File Layout

Posted: Mon Mar 22, 2010 10:19 am
by dandymcgee
GyroVorbis wrote:Agreed. In my opinion, one of the very few flaws with Visual Studio. I've used a wide array of IDEs (DevC++, CodeWarrior, NetBeans, Eclipse, XCode, Code::Blocks), and I still come back to Visual Studio 2008 as (imho) the best compiler out there. The vast array of options and configurations mixed with the absolute best debugging that I have ever seen is unbeatable.

Hop on a Mac and try XCode. You'll be crying to get Visual Studio back.
I used Code::Blocks for a few years, but after seriously switching over to VS the debugger really is something I can't live without.

Re: C++ Visual Studio File Layout

Posted: Mon Mar 22, 2010 10:52 am
by K-Bal
GDB is powerful enough, the debugger interfaces mostly suck.

Debugging a STL container is much more comfortable with VS ;)