linux-gcc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Mistake With CPP File
@ 2002-07-31 11:04 SoloCDM
  2002-08-01  7:09 ` Robert Schiele
  0 siblings, 1 reply; 8+ messages in thread
From: SoloCDM @ 2002-07-31 11:04 UTC (permalink / raw)
  To: Linux-Gcc (Majordomo)

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

Recently I tried to compile fig01_02.cpp with Kernel 2.2.20 on Linux
Mandrake 8.0.  I used "gcc fig01_02.cpp" and received the following
errors:

<user_account>/tmp/ccmeDWKS.o: In function `main':
<user_account>/tmp/ccmeDWKS.o(.text+0xf): undefined reference to
`cout'
<user_account>/tmp/ccmeDWKS.o(.text+0x14): undefined reference to
`ostream::operator<<(char const *)'collect2: ld returned 1 exit status

Why didn't it work?

I attached the file in question.

-- 
Note: When you reply to this message, please include the mailing
      list/newsgroup address and my email address in To:.

*********************************************************************
Signed,
SoloCDM

[-- Attachment #2: fig01_02.cpp --]
[-- Type: text/plain, Size: 178 bytes --]

// Fig. 1.2: fig01_02.cpp
// A first program in C++
#include <iostream.h>

int main()
{
	cout << "Welcome to C++!\n";

	return 0;   // indicate that program ended successfully
}

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

end of thread, other threads:[~2002-08-02 21:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-31 11:04 Mistake With CPP File SoloCDM
2002-08-01  7:09 ` Robert Schiele
2002-08-01  8:38   ` SoloCDM
2002-08-01 13:33     ` Robert Schiele
2002-08-02 12:47       ` SoloCDM
2002-08-02 13:08         ` Robert Schiele
2002-08-02 18:18           ` SoloCDM
2002-08-02 21:40             ` Robert Schiele

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 NNTP newsgroup(s).