Hey.
In workspace I have few projects and one is called "Common". It cointains classes that other project share and it builds to static library. Other project include its headers and link it. Everything works, but it is very annoying that I change something in common project, compile it, then I compile another project and I get "nothing to be done". The solution is to rebuild the project, but it takes ages. I just want to re-link it, as only the lib has changed. Is there any way to do it? To do only "relink" instead of "rebuild"?
Thanks
How to force project to always link when building
-
- CodeLite Enthusiast
- Posts: 19
- Joined: Fri Dec 07, 2012 8:20 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How to force project to always link when building
You did not state your OS, so I will assume its Linux ( in the future, make sure you provide all info needed )netrick wrote:Hey.
In workspace I have few projects and one is called "Common". It cointains classes that other project share and it builds to static library. Other project include its headers and link it. Everything works, but it is very annoying that I change something in common project, compile it, then I compile another project and I get "nothing to be done". The solution is to rebuild the project, but it takes ages. I just want to re-link it, as only the lib has changed. Is there any way to do it? To do only "relink" instead of "rebuild"?
Thanks
As a workaround, I suggest that you add a post build step to the "common" project which deletes the binaries that depends on it ( this will force a re-link )
You add a post build event from:
right click on the project, settings -> pre / post build commands -> Post build
and add something like:
Code: Select all
rm -f ../targetOne
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 19
- Joined: Fri Dec 07, 2012 8:20 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: How to force project to always link when building
Yes, I use linux. Thanks for quick reply!