Author Topic: Dependency Checking & chaning of .h files.  (Read 15922 times)

staloysius333

  • Guest
Dependency Checking & chaning of .h files.
« on: October 10, 2005, 05:23:44 pm »
Hi.  I have noticed that CBs does not appear to catch when a .h file has been changed and does not re-compile the .cpp files automatically  that depend on it.  How do I get CBs to notice when a .h has changed and re-compile ALL .cpp files that depend on it?  Thanks so much!  I've searched for an answer to this question but I am unable to find one.  Sorry if this is a repost.  I hope it's not. :D

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Dependency Checking & chaning of .h files.
« Reply #1 on: October 10, 2005, 05:45:49 pm »
Platform?
Build method? (Settings->Compiler->Other->Build method)
Be patient!
This bug will be fixed soon...

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #2 on: October 10, 2005, 05:55:24 pm »
Platform: WinXP,  Build method? Humm.... "Invoke Compiler directly"

Does this help?

--Allen

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Dependency Checking & chaning of .h files.
« Reply #3 on: October 10, 2005, 07:03:40 pm »
Platform: WinXP, Build method? Humm.... "Invoke Compiler directly"

Does this help?

Hmm, the "direct mode" is known to work flawlessly as far as dependencies are concerned. I find it odd that it's not working for you. It's the first time I hear this and I have never noticed it myself...
Can you post your project file?
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Dependency Checking & chaning of .h files.
« Reply #4 on: October 10, 2005, 11:47:47 pm »
Maybe the .h file in question is NOT included in the project...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Dependency Checking & chaning of .h files.
« Reply #5 on: October 11, 2005, 12:18:11 am »
Maybe the .h file in question is NOT included in the project...

It doesn't matter. The dependency checker scans each file and checks the #included files' modification dates. The only thing that matters is the compiler include dirs being correctly set-up (so that the checker can locate the files - if it doesn't, it assumes they 're not updated).
Be patient!
This bug will be fixed soon...

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #6 on: October 11, 2005, 05:36:14 pm »
Humm, I know the .h files are in the project correctly, else none of my code would compile at all or build.  Unfortunately, I can not post my project because it is "sensitive" to my company's growth.  But I can give screen shots of my set up.  Here they are.  If I have incorrectly setup the header info - or anything else - please, let me know.  I'll change what I'm doing ASAP.  Thanks so much for the help.  It is MuCH appreciated!  :D

I have nothing in "Custom Variables".  The Screen shots I've included are of my compiler setup as well as my project setup.  Also, it is good to know, my "Headers" are all "summed up" in ONE header that is included in all of my .cpp files.  Another words, in my cpp's, I include only one header, which includes all of the other headers needed by all the source code files.  Is that a problem?

(This is going to be hard.  I have a Lot of screen shots but can only post - it seems - one at a time.

--Allen

[attachment deleted by admin]

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #7 on: October 11, 2005, 05:37:39 pm »
More screen shots.

[attachment deleted by admin]

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #8 on: October 11, 2005, 05:38:18 pm »
more shots

[attachment deleted by admin]

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #9 on: October 11, 2005, 05:38:45 pm »
more...

[attachment deleted by admin]

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #10 on: October 11, 2005, 05:39:19 pm »
more

[attachment deleted by admin]

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #11 on: October 11, 2005, 05:40:22 pm »
Thank you for all the help guys!  :D

Sincerely, Allen

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Dependency Checking & chaning of .h files.
« Reply #12 on: October 11, 2005, 06:34:40 pm »
Question - where is the file-in-question located? Mind showing the modification datetime? The compile log?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Dependency Checking & chaning of .h files.
« Reply #13 on: October 11, 2005, 06:40:26 pm »
Quote
(This is going to be hard.  I have a Lot of screen shots but can only post - it seems - one at a time.

In the "reply" form, click "additional options" (you did that to attch a file) and click "more attachments" to add more than one file...

Quote
Thank you for all the help guys!

I see that you 're using the global compiler options to setup your project. That is plain wrong. In global options you should put settings that should be, err, global  :shock:

Try setting the project and target options, available through "Project->Build options" and remove those settings from the global options (I 'm talking about compiler flags, includes, libs, etc).
I bet that your problem will be solved.
Be patient!
This bug will be fixed soon...

staloysius333

  • Guest
Re: Dependency Checking & chaning of .h files.
« Reply #14 on: October 14, 2005, 04:54:47 pm »
Ok, thank you.  File in question.  Compile logs.  Lets see what can do....  & about the global stuff, that sounds really good.  I'll be sure to try that.  Ah, the files in question, the Compile log will, of course, only show what's been compiled but the files in question are my headers.  One header contains all the others, itfp.h.  I'll attached a pic of that too.  I hope this makes it in this post.  The last ones forced me to make multiple posts because of the "size" of the pics.



[attachment deleted by admin]