This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Iostream Error in EGCS-19990307


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]