C++ Visual Studio File Layout

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Live-Dimension
Chaos Rift Junior
Chaos Rift Junior
Posts: 345
Joined: Tue Jan 12, 2010 7:23 pm
Favorite Gaming Platforms: PC - Windows 7
Programming Language of Choice: c++;haxe
Contact:

C++ Visual Studio File Layout

Post 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!
Image
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: C++ Visual Studio File Layout

Post 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 :)
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: C++ Visual Studio File Layout

Post 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.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: C++ Visual Studio File Layout

Post 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.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: C++ Visual Studio File Layout

Post by K-Bal »

GDB is powerful enough, the debugger interfaces mostly suck.

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