Board index » cppbuilder » Project Constantly recompiling after small change

Project Constantly recompiling after small change


2006-05-18 10:57:14 PM
cppbuilder12
Hi and thanks for any response.
I make a small change in a method or header, and do a "make" so I can begin debugging, I see that a whole whack load of cpp files participate in the compile process. Now these cpp files are totally unrelated to the cpp file with the slight change.
The cpp file being changed is not part of the form generated code. The cpp file I made is a class / group of methods that use vectors of structs to hold data. The only thing from the borland library (non std) are the SysUtils.hpp / DateUtils.hpp .
Now this doesn't happen all the time, but I'd say more around 75%. I had to get a second computer to do other work while the project is compiling. There are well over 50+ classes in the project, and the recompile of some of these classes takes a very long time.
Maybe this dinky ex. might make sense.
Form Project
include A.h
include B.h
include C.h
include D.h
B.h
include B1.h
include B2.h
<Change in B2.h>
A.h / C.h / D.h
have nothing to do with B.h
<"Make" on Changes>[NOT a "build"]
A.h ->D.h <recompile>
B1.h ->B2.h <recompile>
Thanks,
Heinz
 
 

Re:Project Constantly recompiling after small change

"Heinz Ketchup" < XXXX@XXXXX.COM >wrote
in message news:446c8b4a$ XXXX@XXXXX.COM ...
Quote
I make a small change in a method or header, and do a "make" so
I can begin debugging, I see that a whole whack load of cpp files
participate in the compile process.
When you make a change in a header file, every .cpp file that includes the
changed file, either directly or indirectly, has to be recompiled.
Quote
B.h
include B1.h
include B2.h

<Change in B2.h>
Changing B2.h will require a recompile of everything that includes B.h.
Also, since B.h itself is effected, it has to be recompiled, which means
recompiling B1.h as well.
Gambit
 

Re:Project Constantly recompiling after small change

Perhaps the pre-compiled header section of your cpp files are not optimally
configured? Can you post the first 20 or so lines (up to #pragma hdrstop)
of a few of your files?
- Clayton
 

{smallsort}