Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT: Make a project rebuild when a library built in another project was rebuild

We have several C projects in Eclipse, using CDT (CodeSourcery++).

There are two projects that build libraries for use in the "main" project that builds the final application.

Now we find that rebuilding one of the libraries does not cause the main project to be also rebuild. Obviously, there is no dependency in the makefile to cause this.

The libraries themselves are linked in properly, but the final build result does not depend on them.

How can we create this dependency?

like image 398
Ber Avatar asked Aug 13 '09 08:08

Ber


2 Answers

You should use the CDT references page to specify the library configuration referenced by your main project.

Right click on Project > Properties > C/C++ General > Paths & Symbols > References

CDT will then ensure that the library project is built first, and will ensure that the main executable is re-linked when the dependent library changes.

like image 112
James Blackburn Avatar answered Nov 15 '22 03:11

James Blackburn


In Main project properties, there is Project References. check on the dependent project. By this way firstly dependant project builds, after than main project building process starts.

like image 25
jack-london Avatar answered Nov 15 '22 05:11

jack-london