Not building on header file change [message #797440] |
Mon, 13 February 2012 13:41 |
Eclipse User |
|
|
|
Hi,
I have Eclipse Platform 3.7.1.M20110909-1335 and CDT 8.0.0.2.
When I want to do 'Build All' headers from other workspace projects are not counted as dependencies, and nothing is rebuilt.
I have a hello world application and a static library project.
The static library is set as a reference in Project Properties -> c/c++ general -> Paths and SYmbols -> References tab -> checked 'Active'. That's the only setting I changed.
By the way, It totally beats me why Eclipse has an additional "Project References" top-level item under Project Properties.
Anyway, I tried both the External Builder (which gets selected by default on project creation) and the INternal Builder, also coupled with combinations of the global setting 'Preferences -> c++ -> Build -> Build configurations only when there are Eclipse resource changes........'
Needless to say, it's upsetting that such things doesn't work out of the box. Any Ideas? Thanks in advance.
[Updated on: Mon, 13 February 2012 13:42] by Moderator Report message to a moderator
|
|
|
|
Re: Not building on header file change [message #797575 is a reply to message #797566] |
Mon, 13 February 2012 17:00 |
Eclipse User |
|
|
|
David Wegener wrote on Mon, 13 February 2012 18:48It sounds like you set the dependency on a library not on header files. If you have no dependency on the changed header files, then there is no reason to build anything.
Of course there is. A change in the binary library (.a file) reflects a change in the implementation, an a change in its headers reflects a change of interface as well.
In eclipse you don't get to choose whether to place dependency on the headers or binary, you just specify the library project as a whole. Depending on what changed in this project (interface of just implementation), the dependent project needs to recompile or merely re-link.
But it's g++ job to do that, I really don't understand why it's not working.
[Updated on: Mon, 13 February 2012 17:00] by Moderator Report message to a moderator
|
|
|
|
Re: Not building on header file change [message #797591 is a reply to message #797580] |
Mon, 13 February 2012 17:16 |
Eclipse User |
|
|
|
David Wegener wrote on Mon, 13 February 2012 19:07Have you exported the includes in the library project? C++ General Properties->Paths and Symbols->Includes. Select the include folder that contains the headers you depend on and click the Export button.
What does it mean to 'Export' the headers? I tried to do it on the library includes in the executable project, to no effect. The include path (-I) is listed there and I can see it in the console output.
Thanks,
Haelix
|
|
|
|
Re: Not building on header file change [message #910753 is a reply to message #797440] |
Mon, 10 September 2012 10:34 |
Eclipse User |
|
|
|
Hi again, is no one else experiencing this?
This seems like really basic functionality, to me.
There are 2 stackoverflow questions on this, no solution.
stackoverflow.com/questions/6822927/eclipse-cdt-rebuilding-a-dependent-project
stackoverflow.com/questions/9884827/eclipse-cdt-not-building-project-on-header-file-change
Bounties, anyone?
|
|
|
|
|
|
|
|
Re: Not building on header file change [message #1023850 is a reply to message #1023806] |
Mon, 25 March 2013 09:52 |
Eclipse User |
|
|
|
Axel Mueller wrote on Mon, 25 March 2013 09:55Emil B wrote on Mon, 25 March 2013 08:38Hello, I haven't been able to find a fix for this.
I can't understand why there's so few that report this problem (and that was no bug for this).
On 2012-04-01 i filed this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800
May ba you want to hop in and vote on it.
There is a similar https://bugs.eclipse.org/bugs/show_bug.cgi?id=210248 which should have been fixed. Do you use the internal builder?
Hi, this bug seems to refer to slightly something else, namely, the re-linking of dependent projects afer the code (cpp) of the library has changed (not the interface). This indeed works. I'm having a header dependency problem, the dependent project should re-compile. The target milestone for that bug is 8.0.2 and I'm using >8.10. My problem reproduces using either the internal or external builder. Have tried countless combinations of settings and nothing works. I even tried past eclipse releases to see if this is a regression bug, doesn't work in any I tried.
|
|
|
Re: Not building on header file change [message #1027719 is a reply to message #1023850] |
Wed, 27 March 2013 10:19 |
Krzysztof Czaiński Messages: 4 Registered: March 2013 |
Junior Member |
|
|
Emil B wrote on Mon, 25 March 2013 05:52Axel Mueller wrote on Mon, 25 March 2013 09:55Emil B wrote on Mon, 25 March 2013 08:38Hello, I haven't been able to find a fix for this.
I can't understand why there's so few that report this problem (and that was no bug for this).
On 2012-04-01 i filed this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800
May ba you want to hop in and vote on it.
There is a similar https://bugs.eclipse.org/bugs/show_bug.cgi?id=210248 which should have been fixed. Do you use the internal builder?
Hi, this bug seems to refer to slightly something else, namely, the re-linking of dependent projects afer the code (cpp) of the library has changed (not the interface). This indeed works. I'm having a header dependency problem, the dependent project should re-compile. The target milestone for that bug is 8.0.2 and I'm using >8.10. My problem reproduces using either the internal or external builder. Have tried countless combinations of settings and nothing works. I even tried past eclipse releases to see if this is a regression bug, doesn't work in any I tried.
Yes, Emil, your bug is exactly what I mean and it is *not* fixed. And yes, the other bug is different, and I'm glad and confirm, that the other bug is fixed.
I use the internal builder. Other builders can't find "make" command.
Let's hope we can get someone's attention to this bug...
Regards,
Kris
|
|
|
Powered by
FUDForum. Page generated in 0.05221 seconds