User forums > Using Code::Blocks
Header dependency in the build
mdzahidh:
I ported the PBRT (Physically Based Rendering Toolkit) source code into Codeblocks project (not using the custom makefile provided by the PBRT). The the trouble is, the header dependency is not working properly. For example if a cpp file A.cpp includes A_header.h and if i modify A_header.h, and do a build, the A.cpp is not recompiled and the the build system does nothing ! However, if i right click on the line of A.cpp
where it says "include A_header.h" and say "Open header" it opens A_header.h properly. So obviously the system can locate the header file but for some reason, the dependecy of A.cpp on A_header.h is not workign properly at build time.
zabzonk:
Are you sure the modification times on the sources are consistent with the system time on your own box?
ollydbg:
works fine here, which version of CB did you use?
mdzahidh:
yes, i checked the modification time and it is consistent with the system time. I modified the file from within CB and checked the modification time using "stat" Even if a header file is modified the corresponding source wouldn't be recompiled when I do a build !
I am using CB 8.02. Any idea why isn't this working ? :(
stahta01:
Simple Questions that I have no idea if the apply to Code::Blocks IDE.
1. Are you using include "file.h" or <file.h>?
I would guess include "file.h" is correct.
2. Does the header file belong to the project?
I would add the header to the project.
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version