| View previous topic :: View next topic |
| Author |
Message |
gouqizi.lvcha@gmail.com Guest
|
Posted: Fri Jul 29, 2005 8:35 pm Post subject: starnge question |
|
|
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
|
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Fri Jul 29, 2005 8:37 pm Post subject: Re: starnge question |
|
|
[email]gouqizi.lvcha (AT) gmail (DOT) com[/email] wrote:
| Quote: | 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?
|
|
| Back to top |
|
 |
Free Bird Guest
|
Posted: Fri Jul 29, 2005 8:59 pm Post subject: Re: starnge question |
|
|
Victor Bazarov wrote:
| Quote: | gouqizi.lvcha (AT) gmail (DOT) com 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?
Is this a joke?
Either that, or he's just extremely ignorant. |
|
|
| Back to top |
|
 |
gouqizi.lvcha@gmail.com Guest
|
Posted: Fri Jul 29, 2005 9:03 pm Post subject: Re: starnge question |
|
|
No.
Victor Bazarov wrote:
| Quote: | gouqizi.lvcha (AT) gmail (DOT) com 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?
Is this a joke?
|
|
|
| Back to top |
|
 |
Ken Wilson Guest
|
Posted: Fri Jul 29, 2005 9:08 pm Post subject: Re: starnge question |
|
|
On Fri, 29 Jul 2005 20:59:05 -0000, "Free Bird" <@> did courageously
avow:
| Quote: | Victor Bazarov wrote:
[email]gouqizi.lvcha (AT) gmail (DOT) com[/email] 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?
Is this a joke?
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()"
|
|
| Back to top |
|
 |
Julián Albo Guest
|
Posted: Fri Jul 29, 2005 9:35 pm Post subject: Re: starnge question |
|
|
[email]gouqizi.lvcha (AT) gmail (DOT) com[/email] wrote:
| Quote: | 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.
--
Salu2
|
|
| Back to top |
|
 |
Phlip Guest
|
Posted: Fri Jul 29, 2005 9:45 pm Post subject: Re: starnge question |
|
|
gouqizi.lvcha wrote:
| Quote: | 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
|
|
| Back to top |
|
 |
gouqizi.lvcha@gmail.com Guest
|
Posted: Fri Jul 29, 2005 11:10 pm Post subject: Re: starnge question |
|
|
Thanks, Philip,
Your answer is quite helpful. I am using gcc and I need to get a better
makefile.
Rick
|
|
| Back to top |
|
 |
|