Workspace vs Project

General questions regarding the usage of CodeLite
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Workspace vs Project

Post by paulkinzelman »

I'm confused about 'workspace' vs 'project' and when people use one or the other.
It looks like a project is the higher level hierarchy, so a project can have several workspaces?
Would multiple workspaces be used to work on and debug different pieces of a large project?
If I have a small project, would I have just a project? Do I have to create a workspace too?
TIA!
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace vs Project

Post by eranif »

You always needs them both.

A workspace is a collection of projects (thus make it the "higher" one in the hierarchy)

The workspace is codelite's (and many other iDEs) way for gathering group of projects (for example, one project produces static library, the other produces a shared object and another one produces the executable)

Lets assume you have 2 projects:
A - A project which produces a static library
B - A project which produces an executable

Each project has 2 build configurations: Debug and Release (in practice you can have many more configurations)
However, when you build the Debug configuration, you wish that *both* projects will use the "Debug" configuration (the same for the "Release" configuration)
This kind of information (which is across projects) is kept in the workspace file

The project itself contains all information it needs to produce its output (shared library, static library or executable)
I hope I was clear.

Also: a project does not know about the workspace - i.e. it can be added into other projects. The workspace however, holds "pointers" to the projects.

Hope it helps, if not, since codelite did not invent the idea of workspace/project I am sure you can find a better explanation on the web
Eran
Make sure you have read the HOW TO POST thread
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace vs Project

Post by paulkinzelman »

That was very helpful, thanks!

So starting from ground zero to create a program, when I start Codelite, the menus imply that I can create either a project or a workspace.

From your explanation, it seems that I should first create a workspace, and then a project under that workspace, right?

In fact, I got it working, I think I created just a project, and it must have created a workspace implicitly? I didn't know which to create first so I just picked one.

This would be a good issue to add to the FAQ or something. I would be happy to write up something (based on your explanation) for addition if you could point me to whomever maintains it. Or maybe making it wiki-ish would be useful?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace vs Project

Post by eranif »

paulkinzelman wrote:the menus imply that I can create either a project or a workspace.
This is because when creating a project without a workspace, codelite will create a workspace for you (it was a feature request ;))
paulkinzelman wrote:if you could point me to whomever maintains it
That would be me
paulkinzelman wrote:Or maybe making it wiki-ish would be useful?
codelite's site *is* a one big wiki.

All the documentation are gathered here:
http://codelite.org/LiteEditor/Documentation

You can contact me via PM (private message) and I can provide you with user name and password to the wiki

Eran
Make sure you have read the HOW TO POST thread
Post Reply