www.delorie.com/archives/browse.cgi | search |
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 |
X-Injected-Via-Gmane: | http://gmane.org/ |
To: | cygwin AT cygwin DOT com |
From: | "Alex Vinokur" <alexvn AT connect DOT to> |
Subject: | Re: g++ iostream broken on windows 2000 |
Date: | Tue, 16 Sep 2003 06:49:21 +0300 |
Lines: | 59 |
Message-ID: | <bk618f$pic$1@sea.gmane.org> |
References: | <20030915234312 DOT 66294 DOT qmail AT web40708 DOT mail DOT yahoo DOT com> |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 6.00.2800.1106 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1106 |
"Vijay Kumar" <janjanam AT yahoo DOT com> wrote in message news:20030915234312 DOT 66294 DOT qmail AT web40708 DOT mail DOT yahoo DOT com... > Hi all, > > I have upgraded to the latest cygwin this morning and > I can not anymore run my programs that use ifstream to > read input files. It crashes giving segmentation > fault. When I ran strace, I found that the actually > fails in mmap.cc complaining STATUS_ACCESS_VIOLATION. > > Here's the simple code I ran. Anybody have any clues? > Interestingly the following programs works fine with > -mno-cygwin option which unfortunaty I can not use for > my application. > > # include <iostream> > # include <fstream> using namespace std; // must be for g++ 3.x; otherwise you should use not 'cout' but 'std::cout', etc. > > int main(int argc, char *argv[]) > { > char ch; > > if (argc < 2) > { > cout << "Usage: a.out file_name" << endl; > } > > ifstream is(argv[1], ios::in); > > while (! is.eof()) > { > is.get(ch); > cout << ch; > } > is.close(); > > return 0; > } > > Thanks, > - Vijay > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > -- > 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/ > > -- 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 |