0

i want to recompile my include files of my project,which includes some header files and .c source files which are files for my Ethetnet driver. Now i want some change in one of my included source file. but when i change and build or rebuild my project, the change in the include .c source file does occur in the final output binary. that means my project taking previously compiled included .o files. So how can i recompile my all include files of the project so that change occur in final output binary.

Thanks in advance.

stacker
  • 68,052
  • 28
  • 140
  • 210

2 Answers2

0

CMIIW but AFAIK it depends on your compiler (which I guess is gcc), dependency analysis against included files may be done or not, and in gcc case it does NOT do it. It only compares .c against its corresponding .o, so you have to force rebuilding when you change the include file. There perhaps certain compiler options you can use, but I don't know for it.

EDIT: Just found a similar question: How can I have a Makefile automatically rebuild source files that include a modified header file? (In C/C++)

Community
  • 1
  • 1
LeleDumbo
  • 9,192
  • 4
  • 24
  • 38
  • yes Lele you are right, i had to forcefully recompile the include files. What i had to do is to separately recompile the modified files (in my case ethernet drivers). So i changed my files and separately recompile all changed files using eclipse. Thank you all for your help. – pankaj sethia Apr 23 '12 at 11:40
0

If you are indeed including the right file (the ones that you have modified, not some with same name from some other directory) then cleaning a project and rebuilding it should help. Just select a project in project explorer, right click, do "clean project", then build it...

dbrank0
  • 9,026
  • 2
  • 37
  • 55