Page 1 of 1
CodeBlocks Question
Posted: Tue Mar 02, 2010 1:14 pm
by JarrodParkes
I have recently installed and set-up the CodeBlocks IDE on my MAC with SDL libraries included. I have been playing around in the IDE looking at different settings and features. One thing I noticed was the inability to create folders within your project to organize files. Maybe I have overlooked something, but the only folder that you can create within your project is a virtual folder? Is a virtual folder the same as a normal folder like one you would create in Visual Studio or something?
Ideally I would like to have...
ProjectName
-> Headers
-> Source
-> Resource
-> Etc.
If anyone knows anything about this or could help clear up some of my confusion, your help would be greatly appreciated!
Thanks,
Jarrod
Re: CodeBlocks Question
Posted: Tue Mar 02, 2010 4:06 pm
by X Abstract X
I'm going to take a guess that it is the same as in Visual Studio. The only reason they call it virtual is because it isn't a folder that actually exists on your disk - it only exists in the IDE, for organizational purposes.
Re: CodeBlocks Question
Posted: Tue Mar 02, 2010 8:37 pm
by JarrodParkes
So visual studio also creates these "virtual" folders, however I'm guessing it is just less obvious? I guess I am being too picky, I just like to know what/why everything is where it is on the screen.
Thanks,
Jarrod
Re: CodeBlocks Question
Posted: Tue Mar 02, 2010 10:07 pm
by X Abstract X
Yes, in visual studio for example, my headers and source files are in separate "folders". However, when you look at them in the project folder outside of Visual Studio, they are NOT in separate folders.
Re: CodeBlocks Question
Posted: Tue Mar 02, 2010 10:34 pm
by XianForce
Not too sure about the Mac version, but I'm assuming it's the same as the PC version. Anyways, right click on your project, and click "Add Virtual Folder". If you want a folder within a folder, you can right click a folder and click "Add Virtual Folder".
Re: CodeBlocks Question
Posted: Wed Mar 03, 2010 11:50 am
by JarrodParkes
XianForce wrote:
"Not too sure about the Mac version, but I'm assuming it's the same as the PC version. Anyways, right click on your project, and click "Add Virtual Folder". If you want a folder within a folder, you can right click a folder and click "Add Virtual Folder"."
Yeah I got that far, I was just unsure what exactly it was doing. Well, looks like I have some new experimentation to do...
Thanks,
Jarrod
Re: CodeBlocks Question
Posted: Wed Mar 03, 2010 7:15 pm
by Falco Girgis
Jarrod, the only IDE that I've encountered that actually keeps a directory structure (nonvirtual) in the IDE is XCode (the one thing it does right).
Visual Studio, Code::Blocks, and I think DevC++ support directories in the project only "virtually." So I have a folder in the engine called source and one called header. Then I organize these nicer in the project with a bunch of virtual folders/filters called things like player, level, physics, collision, etc.
Re: CodeBlocks Question
Posted: Wed Mar 03, 2010 8:13 pm
by avansc
EDIT: ah i just saw you said in the IDE, my bad, but just dont think that gets translated to filesystem.
actually xcode does a few things right...
now. as for your comment. well this is a complicated issue really.
xcode does very sneaky things to ultimately make your life easier, but in the process can bug.
by default xcode DOES use a virtual structure. The reason being that in a project it could be showing that you are using lets say SDL.framework, but in reality its just a link to somewhere. so for there kinda files i recommend staying with the virtual folder.
okay, now for folders/structure and files that you want in the project workspace to have the same structure in the filesystem.
ps: xcode will show a yellow folder for a virtual and a blue one that exists.
So, if you want to have a non virtual structure you have to set it up on the file system. then add existing files to xcode, but tick the tab, "create folder references for any added folders", this will ensure that it maintains a real structure.
its a little bit of a pain, and there might be a way to make a script that will convert groups to folders for you, but whatev.
hope that clears that up.