starnge question

G

gouqizi.lvcha

Hi,

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!

Rick
 
V

Victor Bazarov

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?

Is this a joke?
 
K

Ken Wilson

Either that, or he's just extremely ignorant.
And writing classes? Looks like fish bait to me. ;-)

Ken Wilson
"Coding, coding, over the bounding main()"
 
?

=?ISO-8859-15?Q?Juli=E1n?= Albo

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

You change "strange" for "starnge", for example?

Try changing bigger bits.
 
P

Phlip

gouqizi.lvcha said:
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.
 
G

gouqizi.lvcha

Thanks, Philip,

Your answer is quite helpful. I am using gcc and I need to get a better
makefile.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top