On Thu, Mar 02, 2000 at 01:40:59PM -0700, John Starkey wrote:
> gcc --version shows egcs-2.91.66
>
> I'm not sure of the difference between the two (gcc and egcs). I started reading
> something about it yesterday. I think egcs was being merged with gcc??
>
egcs has been merged with gcc in the 2.95 series. They are back together
now, but egcs-2.91.66 is probably fine. Most of the really broken c++ stuff
got fixed by then.
> Ok. This is way above my head. I am in beginner C++. I'm kinda following. But not
> sure what the header is. I'm thinking that it's everything before the main()
> function??
>
Right. Don't worry about it too much then. a header is just a file
that you #include into your code, when you want to use something that
is mentioned it the file.
fire up man 2 open for just a second. You'll see three functions
listed, as well as three #include lines that you need in your code
if you want to use those functions.. The headers are all under
/usr/include but will mostly look like gobbodly-guk to you.
> > However if you compile all code -Wall you will get warned (in C at least,
> > I very rarely use the c++ compiler any more.) about implicit declarations
> > of functions.
>
> What is the purpose of -Wall??? Does this mean that there is no margin for error
> in compiling the code??? Like, if it doesn't know exactly what is intended the it
> won't continue.
>
Somewhat. -Wall turns on all compiler warnings. warnings won't
stop compiliation, but will let you know that the compiler thought
something you wrote might be interpreted incorrectly and you should
take a look at it and fix it. I find compiling with -Wall all the
time is just a good idea. It makes everything come out nicer at the
end.
oh! and warnings get spit out to stderr, so if you've written a
bunch of code (or if I've written a bunch of code) without trying
to compile it, so there are two or three pages of errors, you can
compile with
$compiler $options $file 2>/tmp/errors
so you can browse through the errors to fix them.
By the way, have you managed to get c++ to compile with any of the advice
you got?
greg
--
this is not here
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs