delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
References: | <b9324bf80807160901j6f44f2ecl3c8eb0032cafa1f6 AT mail DOT gmail DOT com> |
Subject: | RE: help with iofstream - Exception: STATUS_ACCESS_VIOLATION when writing or reading |
Date: | Wed, 16 Jul 2008 17:40:27 +0100 |
Message-ID: | <02af01c8e762$a6fb7dd0$2708a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <b9324bf80807160901j6f44f2ecl3c8eb0032cafa1f6@mail.gmail.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id m6GGevGE021929 |
Matias Bonaventura wrote on 16 July 2008 17:01: > I reduce the error and create a simple test case which outputs the same > error: > > > > [(!) DEBUG. Before opening the file] > [(!) DEBUG. Before writing into the file] > 57 [main] test 5664 _cygtls::handle_exceptions: Exception: > STATUS_ACCESS_VIOLATION > 766 [main] test 5664 open_stackdumpfile: Dumping stack trace to > test.exe.stackdump > > > The test case code I´m using: No it isn't. When I tried to compile the code you gave I get all these errors: ./fileio.cc: In function `int main()': ./fileio.cc:6: error: `cout' undeclared (first use this function) ./fileio.cc:6: error: (Each undeclared identifier is reported only once for each function it appears in.) ./fileio.cc:6: error: `endl' undeclared (first use this function) ./fileio.cc:7: error: `ofstream' undeclared (first use this function) ./fileio.cc:7: error: expected `;' before "file" ./fileio.cc:8: error: `file' undeclared (first use this function) ./fileio.cc:8: error: `FILE_NAME' undeclared (first use this function) ./fileio.cc:8: error: `ios' has not been declared ./fileio.cc:8: error: `out' undeclared (first use this function) ... and the moral of the story is "If you want people to help you with a problem, don't tell them lies". Show them the REAL code, not a useless snippet that won't compile. > Any idea why this could be happening? Is it a problem with my cygwin > instalation, with the compiler....? > > I´m using gcc-2.95. I didn´t try with newer versions because the > application I´m trying to compile targets that compiler and won´t work > the newer. There are known to be bugs in 2.95 and in particular in 2.95's version of the C++ runtime and STL. I nearly didn't bother, because I had to go look up which headers to include and fix your non-compiling code, but I was feeling generous, so I fixed it and built it with current gcc-3.3.3; it works fine with that. >I didn´t try with newer versions because the > application I´m trying to compile targets that compiler and won´t work > the newer. Well, you need to have a serious think about that, because your application clearly won't work with that older one either. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |