There is no way to "link" two projects together in the form of one being depended on the other.
We agree on that !
You can, however, make a target's output dependent on another target's output (even if it belongs to a different project). That's why you select as external dependencies only executables or libraries (shared or static).
I really understand but this is not equivalent! I expect both targets to be recompiled if I modify something in the dependent target. Actually, if A is the currently selected target, A depend on B (a library) and I modify a .cpp file of B, none are recompiled except if I manually recompile B. The right way to do it is to depend on all executables/libraries/source files/user dependencies from the dependent target and that's a pain to set.
So, maybe you could add the "project dependencies" or "target dependency" feature. The main thing to do is to check that all the dependent project are up-to-date before proceeding to the compilation of the current project, and if not, perform the compilation of the dependent out-to-date project and relink.
In the SDK, 2 additionnal methods need to be implemented in cbproject.h /.cpp:
addProjectDependency(wxString projectName);
wxArrayString getProjectDependencies();
What do you think about that ? Could this be implemented in the SDK even if methods are empty, so that i will be able to solve a part of the visual import bug ?!
I advocate I really need this feature. IMHO workspaces are useless if there's no way to make dependencies between projects/targets. What's the point of having many projects displayed simultaneously if they are no dependencies between them, or if they do not recompile properly when we edit some files?! Code::Blocks is great but without this feature it's unusable to me. I'll switch off using it if if this is not implemented but that would be a shame !
I keep trying to solve the visual workspace import bug but this is the main problem to the conversion for now.
I think using the order of the projects to get things compiled in the proper order is not the best idea.
May be so, but in the end that's what it comes down to: a list of projects to build, one after another. It just so happens that this list is visible all the time: It's the workspace view :)
Worse, there's no easy way to move projects up and down in the workspace project list! For sure, using project dependencies would be better for that.
Try Ctrl-Shift-UpArrow and Ctrl-Shift-DownArrow ;)
Or programmatically:
Manager::Get()->GetProjectManager()->MoveProjectUp(cbProject*);
// or
Manager::Get()->GetProjectManager()->MoveProjectDown(cbProject*);
These are not easy ways?
On another note, it just occured to me you might be talking about projects build order inside a workspace. If that's the case, then the only useful hint I can give you is that projects are built top-to-bottom, as seen in the workspace tree. This means if a project A must be compiled before project B, A must be above B in the project tree. Then a "Compile->Compile all projects" will do the trick (i.e. build all in the right order).
And, as you can see, I finally understood what you 're saying :)
You have to excuse me because I have never used any Microsoft IDE, so their terminology eludes me...
I thought I 'd quote this to emphasize it. In simple words: if you can't contribute code that does what you 're saying, the least you could do is provide detailed info on this thing and possible implementation details.
Yiannis.