www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/13/12:13:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 13 Aug 2002 12:13:57 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: GCC3 problems with C++ fstream
Message-ID: <20020813161357.GO9193@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <187198960129 DOT 20020812184802 AT familiehaase DOT de>
Mime-Version: 1.0
In-Reply-To: <187198960129.20020812184802@familiehaase.de>
User-Agent: Mutt/1.3.23.1i

On Mon, Aug 12, 2002 at 06:48:02PM +0200, Gerrit P. Haase wrote:
>Hallo,
>
>Code:
>=====
>#include <fstream>
>void main() //the program starts here
>{
>ofstream SaveFile("cygwin.txt");
>SaveFile << "Hello World, this works with gcc-2 but not with gcc-3!";
>SaveFile.close();
>}

Funny, this program doesn't even compile for me.  However, if I change
fstream to fstream.h, I get a big warning about using a deprecated header
file and it links/runs fine.

I don't know why you're searching /usr/include/g++-3.  That directory should
have been deleted with recent test versions of gcc 3.x however, I see
that I have it on my system too.  I thought that was due to my gcc testing.

Possibly removing it will cause g++ to work as expected.

cgf

>GCC3:
>=====
>$ g++ --version
>g++ (GCC) 3.1.1 20020718 (prerelease)
>
>$ g++ -o fstream fstream.cpp
>In file included from /usr/include/g++-3/streambuf.h:36,
>                 from /usr/include/g++-3/iostream.h:31,
>                 from /usr/include/g++-3/fstream.h:30,
>                 from /usr/include/g++-3/fstream:6,
>                 from fstream.cpp:1:
>/usr/include/g++-3/libio.h:30:23: _G_config.h: No such file or directory
>In file included from /usr/include/g++-3/streambuf.h:36,
>                 from /usr/include/g++-3/iostream.h:31,
>                 from /usr/include/g++-3/fstream.h:30,
>                 from /usr/include/g++-3/fstream:6,
>                 from fstream.cpp:1:
>/usr/include/g++-3/libio.h:239: '_G_off_t' is used as a type, but is not 
>   defined as a type.
>/usr/include/g++-3/libio.h:279: `read' was not declared in this scope

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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