gouqizi.lvcha wrote:
Sometimes, when I change a small bit of a class defined in a common
header file shared by multiple files, I need to recompile all the files
in the project that use that class or I will get all kinds of strange
run-time errors. Does anyone know the reasons? Thanks a lot!
Sorry about the local yokels. They forget that the learning curve to compile
is non-obvious.
You are probably compiling without an IDE that puts together all these files
into build scripts automagically. If you compile on a command line, with
g++, change a header, don't recompile everything, and link, you will get
weird errors. That's because each time you change a header file, every C++
file using that header must recompile. The .o or .obj files don't see the
new header automatically.
From here, use Google to find a newsgroup that treats your compiler, and
they will recommend the best editor and/or build scripts for it.
--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand