Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » header file dose not rebuild after update
header file dose not rebuild after update [message #1789867] Thu, 31 May 2018 05:36 Go to next message
Ron Potashnik is currently offline Ron PotashnikFriend
Messages: 7
Registered: May 2018
Junior Member
If i change some header file in my project, and use build, the source file that dependent on this header file dose not compile again , and uses the old object file with the old header configuration.

If i want that the object file will compile again, i need to clean it before use build.



Re: header file dose not rebuild after update [message #1789904 is a reply to message #1789867] Thu, 31 May 2018 16:11 Go to previous messageGo to next message
David VavraFriend
Messages: 778
Registered: October 2012
Senior Member
You makefile doesn't have the file as a dependency for the object.
How dd you create the makefile?

The makefile generated by Eclipse will create dependency files (*.d) along with each object (*.o)
These are used during later builds.
If you've made your own makefile then you need to do something similar.

If you don't know how read:
http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
That was the first link after Googling "how to generate dependency files gcc"
There are others.
Re: header file dose not rebuild after update [message #1791229 is a reply to message #1789904] Tue, 26 June 2018 10:50 Go to previous messageGo to next message
Ron Potashnik is currently offline Ron PotashnikFriend
Messages: 7
Registered: May 2018
Junior Member
i am using the eclipse makefile but still my problem didn't solved.
Re: header file dose not rebuild after update [message #1791250 is a reply to message #1791229] Tue, 26 June 2018 16:49 Go to previous message
David VavraFriend
Messages: 778
Registered: October 2012
Senior Member
There isn't enough information to tell you why.
Clearly make doesn't think the header is a dependency.
You'll have to find out why.

The C/C++ HelloWorld projects use similar mechanisms as outlined in the link I provided.
You might want to start with one of those projects and modify it as needed.


Previous Topic:Project Creation Performance
Next Topic:Arduino C++ can't use functions? duplicate
Goto Forum:
  


Current Time: Tue Sep 25 19:18:23 GMT 2018

Powered by FUDForum. Page generated in 0.02235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top