delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/25/08:56:24

From: grapeape AT scott DOT net
Subject: Re: iostreams won't work
25 Apr 1997 08:56:24 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.LNX.3.91.970425081613.4029A-100000.cygnus.gnu-win32@koala.scott.net>
Mime-Version: 1.0
Original-To: Matthew Mueller <donut AT azstarnet DOT com>
Original-cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <3.0.32.19970423205747.0069b274@pop.azstarnet.com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Thats a C++ program not C.  g++ is the C++ compiler, not gcc.
I bet you could compile that on any gcc and get the same errors :).

Chris

On Wed, 23 Apr 1997, Matthew Mueller wrote:

> when I try to compile this program:
> 
> #include <iostream.h>
> #include <stdio.h>
> int main(void){
>   cout << "hi.\n";
>   getchar();
>   cout << "bye.\n";
>   return 0;
> }
> 
> 
> I get this error:
> 
> f:\prog\c32>gcc test.cpp
> C:\WIN95\TEMP/cc0010001.o(.text+0x1a):test.cc: undefined reference to `cout'
> C:\WIN95\TEMP/cc0010001.o(.text+0x1f):test.cc: undefined reference to
> `ostream::
> operator<<(char const *)'
> C:\WIN95\TEMP/cc0010001.o(.text+0x60):test.cc: undefined reference to `cout'
> C:\WIN95\TEMP/cc0010001.o(.text+0x65):test.cc: undefined reference to
> `ostream::
> operator<<(char const *)'
> 
> 
> I have all the environment vars set as specified in the FAQ.  I have
> successfully compiled several standard c program.
> --
> Matthew Mueller
> donut AT azstarnet DOT com
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
> 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019