User forums > Using Code::Blocks

Does not recompile changed header files?

<< < (2/8) > >>

rhf:

--- Quote from: ollydbg on January 23, 2009, 03:53:53 am ---What's your problem when debugging?
--- End quote ---
Program would not stop at a break in header.

--- Quote --- Absolute path is recommended in compiling if you want to debug using GDB.
--- End quote ---
Thanks. I sort of figured that out. I did not realize it was recommended.

rhf:

--- Quote from: ollydbg on January 23, 2009, 03:53:53 am --- ...make sure your header file was include in your project as thomas said.
--- End quote ---
Thanks, ollydbg, but that is exactly the situation I am describing. The header file is definitely in my project.

As I describe above, if the path to the header file is in my Project Search directories, when I modify the header file and then do a Build (Ctrl-F9), the modified header file is saved and the affected files are re-compiled as expected.

However, if the path to the header file is in my Global compiler settings Search directories, and not in the Project Search directories, then when I do a Build, the modified header file is saved, but the affected files are not re-compiled. I have to do a Rebuild (Ctrl-F11) to force the re-compilation, which of course re-compiles everything, not just the affected files.

This is on Windows XP with latest SVN  releases.

Decrius:
Thanks rhf, that was indeed the problem!

Adding the path to the projects search paths and not only to the global makes it recompile all depending files on that header file. Also works if the path is in both project as global search paths.

Definitely a bug.

carra:

--- Quote from: Decrius on February 03, 2009, 08:45:37 pm ---Definitely a bug.

--- End quote ---
I hate to refloat a thread SO old, but I have recently come across this bug too, and I didn't find this mentioned any more recently. So, just take it as a reminder...

It's nasty to have files included in the project and not taken into account for changes ;)

oBFusCATed:
Please provide an example project and the steps needed to reproduce the problem.
I've never seen this bug and I use lots of headers not included in the project.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version