Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 >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/