By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,925 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,925 IT Pros & Developers. It's quick & easy.

starnge question

P: n/a
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

Jul 29 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
go***********@gmail.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?
Jul 29 '05 #2

P: n/a
Victor Bazarov wrote:
go***********@gmail.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.
Jul 29 '05 #3

P: n/a

No.

Victor Bazarov wrote:
go***********@gmail.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?


Jul 29 '05 #4

P: n/a
On Fri, 29 Jul 2005 20:59:05 -0000, "Free Bird" <@> did courageously
avow:
Victor Bazarov wrote:
go***********@gmail.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.

And writing classes? Looks like fish bait to me. ;-)

Ken Wilson
"Coding, coding, over the bounding main()"
Jul 29 '05 #5

P: n/a
go***********@gmail.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


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

Try changing bigger bits.

--
Salu2
Jul 29 '05 #6

P: n/a
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
Jul 29 '05 #7

P: n/a
Thanks, Philip,

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

Rick

Jul 29 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.