Hi!
I'd like to have a workspace with two projects. The first one should be a static library [ using C++ language ]. The second should be a normal console application which links the library from the first project. How to prepare such hierarchy? It would be nice if compilation of the second project will be starting a build process of the first one.
Hi trafalgrar,
in CB you can define so called project dependencies in a workspace. So save the projects in a workspace and then go to the project properties and choose project dependencies. This will sove your problem.
Project dependencies work good. But what about saving the workspace? When I choose "save workspace" what file extensions should I use? *.cbp doesn't work.
*.workspace
It seems projects dependencies doesn't work as they are supposed to. For example - Project2 depends on Project1. If I change something in Project1 while Project2 is already built then nothing is going to happen [ CB says everything is up to date ]. I have to build Project1 manually and after that rebuild Project2. It's annoying. How to make it work.
Can you attach a small example?
Sure, check an attachment for example workspace.
If I modify main.cpp in the DEP_LIB and if I want to have a new library to be compiled into the DEP_APP, I have to either rebuild the the DEP_APP or rebuild DEP_LIB first and then DEP_APP. In MSVC for example such dependencies work that I need to build [ not rebuild! ] only DEP_APP [ IDE checks all dependant projects if they are up to date ]. CB seems it doesn't check this properly.
[attachment deleted by admin]
last week I had a minor chat with the Don about this, I was gonna experiment with this, since waht I recall was that there were issues, and I think this is an important one to solve, will make CB a real build system then and will be very good for usability since CB then does what most users will expect from it.
To me and for the workspace you uploaded, that works with the expected behaviour.
I mean before building DEP_APP (modified or not) CB will first look if DEP_LIB is up_to_date, and compile it if it's not.
Config for that : WIN XP SP2, CB (svn 4564), gcc compiler
But i remember having this problem sometimes in the past too.