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

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: iostreams won't work
25 Apr 1997 08:18:22 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <01BC515B.4A044980.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Original-To: "'Matthew Mueller'" <donut AT azstarnet DOT com>
Original-Cc: "'GNU-Win32'" <gnu-win32 AT cygnus DOT com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Matthew Mueller[SMTP:donut AT azstarnet DOT com] wrote:
>when I try to compile this program:
[snip: program using iostreams]
>I get this error:
>
>f:\prog\c32>gcc test.cpp
>C:\WIN95\TEMP/cc0010001.o(.text+0x1a):test.cc: undefined reference to `cout'
[snip: etc...]

Try "gcc test.cpp -liostreams" or "gcc test.cpp -lstdc++" to link in a
library which contains iostreams. They are not linked by default.

The actual strange thing is that g++ doesn't seem to link these by
default either (correct me if I'm wrong).

Colin.

-- Colin Peters - colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
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