Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Wavesonics on January 28, 2009, 10:29:35 pm

Title: Getting project to relink when dependencies are recompiled
Post by: Wavesonics on January 28, 2009, 10:29:35 pm
I have a project that depends on other projects in the work space.

I have those other projects set up property as dependencies, so when I compile the top level project, it checks for changes and recompiles the projects it depends on.

Problem is, if there were no changes to the top level project, it will recompile the sub projects, but not relink the top project. Is there any way to get it to do this?
Title: Re: Getting project to relink when dependencies are recompiled
Post by: Jenna on January 29, 2009, 07:20:30 am
Is it dynamically linked ?
If yes, it does not need a rebuild, unless you change your header files. In this case the api might have changed and a new build should be done.

If only the implementation changes, and the libs are loaded dynamically, no new build is needed.

You also don't have to build your whole system after every linux or windows update, right ?
That's one advantage of dynamically loaded libs.
Title: Re: Getting project to relink when dependencies are recompiled
Post by: Wavesonics on January 29, 2009, 08:15:59 am
No, it's all statically linked.
Title: Re: Getting project to relink when dependencies are recompiled
Post by: Jenna on January 29, 2009, 10:39:27 am
You can setup dependencies on external files to force a relink:

You have to setup this for every target you have, because different targets (e.g. Debug and Release) might depend on different libs (or whatever).