delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/25/02:31:58

From: jpmorgan AT unm DOT edu (James Paul Morgan)
Subject: Re: iostreams won't work
25 Apr 1997 02:31:58 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.A32.3.91.970424155823.219420G-100000.cygnus.gnu-win32@musca.unm.edu>
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

On Wed, 23 Apr 1997, Matthew Mueller wrote:

> when I try to compile this program:
>
[SNIP] 
> 
> 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::
[SNIP]
> 
That's because you need to do 'g++ test.cpp'.  

I just tried it to make sure that was the difference.  The g++ makes 
assumptions about the nature of the program to be compiled, that it is 
C++ code, but gcc makes different assumptions.  (That it's C code, I 
believe.)  If you're using the streams, use 'g++'.


See ya around the Mulberry bush.

--James

:)

-
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