public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* undefined reference to `cout'
@ 1998-03-27 15:18 Mark Shacklette
  1998-04-02 11:32 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Shacklette @ 1998-03-27 15:18 UTC (permalink / raw)
  To: egcs

Hi:

I've compiled and built egcs1.0.2 on a RedHat 5.0 system running 2.0.31.  When
I try and build a cpp program, I get the following link error:

/tmp/cca281661.o: In function `main':
/tmp/cca281661.o(.text+0x9): undefined reference to `cout'
/tmp/cca281661.o(.text+0xe): undefined reference to `ostream::operator<<(char
const *)'

This is from a simple cout statement.  Something appears very messed up with my
linker's ability to find the C++ libraries.  What am I doing wrong?

Thanks for any help,

Mark


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

* Re: undefined reference to `cout'
  1998-03-27 15:18 undefined reference to `cout' Mark Shacklette
@ 1998-04-02 11:32 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 1998-04-02 11:32 UTC (permalink / raw)
  To: Mark Shacklette; +Cc: egcs

	I've compiled and built egcs1.0.2 on a RedHat 5.0 system running 2.0.31.  When
	I try and build a cpp program, I get the following link error:

	/tmp/cca281661.o: In function `main':
	/tmp/cca281661.o(.text+0x9): undefined reference to `cout'

There is perhaps something wrong with the gcc command you typed, or there is
perhaps something wrong with the way you installed egcs.  It isn't possible
to tell from the info you provided.

If you typed `gcc', then you might try typing `g++' instead.  This will
automatically link with the libstdc++ library (-lstdc++) which contains cout.

Jim

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

end of thread, other threads:[~1998-04-02 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-27 15:18 undefined reference to `cout' Mark Shacklette
1998-04-02 11:32 ` Jim Wilson

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).