Author Topic: Solution folders in C::B?  (Read 6105 times)

Offline SmokeALot

  • Single posting newcomer
  • *
  • Posts: 3
Solution folders in C::B?
« on: October 30, 2008, 12:02:55 pm »
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Solution folders in C::B?
« Reply #1 on: October 30, 2008, 05:57:29 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline SmokeALot

  • Single posting newcomer
  • *
  • Posts: 3
Re: Solution folders in C::B?
« Reply #2 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.
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Solution folders in C::B?
« Reply #3 on: October 30, 2008, 08:38:07 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline SmokeALot

  • Single posting newcomer
  • *
  • Posts: 3
Re: Solution folders in C::B?
« Reply #4 on: October 30, 2008, 09:20:34 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
« Last Edit: October 30, 2008, 09:22:20 pm by SmokeALot »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Solution folders in C::B?
« Reply #5 on: November 01, 2008, 09:53:45 am »
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.
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Photon

  • Guest
Re: Solution folders in C::B?
« Reply #6 on: January 03, 2009, 07:07:41 pm »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Solution folders in C::B?
« Reply #7 on: January 03, 2009, 07:25:16 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Photon

  • Guest
Re: Solution folders in C::B?
« Reply #8 on: January 03, 2009, 08:56:20 pm »
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.