News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Solution folders in C::B?

Started by SmokeALot, October 30, 2008, 12:02:55 PM

Previous topic - Next topic

SmokeALot

Hello,

is there any possibility to add Visual Studio style-solution folders to an existing solution in code blocks?

Here is what I want to achieve:
http://img253.imageshack.us/img253/1280/vsfw4.jpg

http://msdn.microsoft.com/en-us/library/haytww03(VS.80).aspx

Thank you

MortenMacFly

Quote from: SmokeALot on October 30, 2008, 12:02:55 PM
is there any possibility to add Visual Studio style-solution folders to an existing solution in code blocks?
Yes. Solutions in MS are (if you like) Workspaces in C::B. A workspace can contain 1..n projects which itself can contain 1..n targets. Notice that a target may be used in different styles. Either (for example) to separate release from a debug code, but also to be a DLL / shared library / executable... whatever you like.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

SmokeALot

Actually I was refering to 'virtual' folders in a c::b workspace, in which I can add stand-alone files or c::b projects.
The point is, I have a lot of different projects (such as client/server/masterserver etc.) in my current workspace and such virtual folders would help me a lot to well arrange them.

That what I mean in VS2008:
http://img253.imageshack.us/img253/1280/vsfw4.jpg

MortenMacFly

Quote from: SmokeALot on October 30, 2008, 07:44:38 PM
Actually I was refering to 'virtual' folders in a c::b workspace, in which I can add stand-alone files or c::b projects.
Yes, C::B supports that. Just right-click on the project and inspect the menu... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

SmokeALot

#4
Quote from: MortenMacFly on October 30, 2008, 08:38:07 PM
Quote from: SmokeALot on October 30, 2008, 07:44:38 PM
Actually I was refering to 'virtual' folders in a c::b workspace, in which I can add stand-alone files or c::b projects.
Yes, C::B supports that. Just right-click on the project and inspect the menu... ;-)
Probably my own stupidity, but I still do not get it. As seen in the picture I posted above, I want to create a virtual folder (as a direct child of the workspace, not a project), whose children are projects. I do know that there are virtual folders in projects, but I need the same functionality in a workspace.

On right-clicking on Workspace, I only get these options:

Rename workspaces...
---------------------
Save workspace
Save workspace as...
---------------------
Find File...
---------------------
Close workspace

MortenMacFly

Quote from: SmokeALot on October 30, 2008, 09:20:34 PMI want to create a virtual folder (as a direct child of the workspace, not a project), whose children are projects. I do know that there are virtual folders in projects, but I need the same functionality in a workspace.
Virtual folders on workspace level are not supported and (in fact) make no sense from a C::B project management point of view. In that case must create a project with 1..n targets. Image the project to be a solution and a target to be a project (you don't even need a workspace then). Take in mind, that C::B did not "copy" the system of Visual Studio for several reasons (one of it is that most of us do not even know VS). You need to adapt your thinking to C::B slightly. But from user experience we know that you can do most things you can do with VS, too. But they maybe named different.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Photon

I am also looking for a solution to this problem.
Let me describe a scenario in which using such folders makes a lot of sense.
Suppose you have an application that links with 100 libraries.   In normal development you only modify the application code and a few libraries.    Grouping libraries into groups (or hierarchy) allows you to easily navigate the workspace according to relevance/context.
Without such grouping, you would need to scroll in a long list of libraries in order to find one.

MortenMacFly

Quote from: Photon on January 03, 2009, 07:07:41 PM
Without such grouping, you would need to scroll in a long list of libraries in order to find one.
Probably I still don't understand. But what's wrong with creating a "lib" project that contains all the libs as 1..n targets? (Probably using virtual folders in that project?!). You can use virtual targets in addition to goup the libs for building purposes, if you like...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Photon

The idea sounds like it could work, but so far I had no success in doing that.
I tried creating a new project using the Empty Project type.  I can create virtual folders in it, but I'm not sure how to add an existing project as a target.