This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Iostream Error in EGCS-19990307
- To: David Starner <dstarner98 at aasaa dot ofe dot org>
- Subject: Re: Iostream Error in EGCS-19990307
- From: Mircea Damian <dmircea at kappa dot ro>
- Date: Mon, 22 Mar 1999 12:20:25 +0200
- Cc: egcs-bugs at egcs dot cygnus dot com
- References: <36F546CB.86DA0C17@aasaa.ofe.org>
On Sun, Mar 21, 1999 at 01:21:47PM -0600, David Starner wrote:
> Reading specs from
> /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.11/specs
> gcc version egcs-2.93.11 19990307 (gcc2 ss-980929 experimental)
>
> For that egcs,
> #include <iostream>
> #include <fstream>
>
> ofstream Log("logfile");
>
> int main () {Log << "Hello, World!"; return 0;};
>
> causes a segmentation fault, while opening logfile. It leaves an empty
> logfile on the disk. However, the version compiled with the egcs from
> Debian unstable (1.1.2 pre 3 with some minor patchs) runs, outputting
> nothing to the console and a logfile with "Hello, World!" in it.
> --
> David Starner - OSU student - dstarner98@aasaa.ofe.org
> If you want a real optimist, look up Ray Bradbury. Guy's nuts.
> He actually likes people. -David Brin
Try to run:
#include <iostream>
int main() { cout << "test"; exit(0); }
if it failes too then it's the same problem I posted yesterday(and you have glibc 2.1)..
Try removing /usr/include/g++ first(or move it somewhere else) and then recompile egcs.
That solved my problem.
--
Mircea Damian
Network Manager
dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro