public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Mandrake 9.0 & GCC 3.2
@ 2002-10-10 13:38 allstargrogg
  2002-10-10 13:54 ` bjorn rohde jensen
  0 siblings, 1 reply; 2+ messages in thread
From: allstargrogg @ 2002-10-10 13:38 UTC (permalink / raw)
  To: gcc-help

I just updated to mandrake 9.0 which included a new version of GCC (3.2) as
well as a new version of the libstdc++ (5.0) and it is causing problems.  I
can't compile c++ programs that I used to be able to.  It gives me a
warning of deprecated header files and tells me to start including them as
<X> instead of <X.h>.  When I try this it then tells me I have to declare
cout and cin and endl (I was using iostream.h in this specific program)
which made absolutely no sense to me.  Also, it did not recognize the void
declaration for my main procedure.  Is this really the new standard library
being implemented, or is this just some fluke that is not correct?  Please
help.
John Grogg



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Mandrake 9.0 & GCC 3.2
  2002-10-10 13:38 Mandrake 9.0 & GCC 3.2 allstargrogg
@ 2002-10-10 13:54 ` bjorn rohde jensen
  0 siblings, 0 replies; 2+ messages in thread
From: bjorn rohde jensen @ 2002-10-10 13:54 UTC (permalink / raw)
  To: allstargrogg; +Cc: gcc-help

Hi John,

  I think, the problem, you are experiencing, is due
to namespaces. The standard library resides in the
std namespace according to the specs, so you have
to use std::cin, std::cout and so forth. The old
.h headers usually dont populate the std namespace
or they pull it in with a using namespace std.
  I must say, i am quite surprized at the idea of
declaring main as void main(...), it certainly is
not a standard way of doing things. Why dont you
want to return a meaningfull exit code to the
user/shell/whatever of your executables?? I think,
you really ought to declare main as;

int main(int argc,char *argv[]);

Yours sincerely,

Bjorn

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-10 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 13:38 Mandrake 9.0 & GCC 3.2 allstargrogg
2002-10-10 13:54 ` bjorn rohde jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).