streambuf.h:403: parse error before `ios'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have seen lots of posting about what I am experiencing but no remedy. I
don't get a sense it is a global library issue so I must be doing something
wrong. Here is the simplest source code:


#include <stdio.h>
#include <sys/io.h>
#include "/usr/include/g++-3/fstream.h"
ofstream SaveFile("test.txt");
SaveFile << "Test Log File\n";
SaveFile.close();

The command to compile is gcc -O3 -o test test.c -Wall
-I/usr/include/g++-3/fstream.h

I use gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
I get ton and ton of parse erros in different lib files such as streambuf.h
and iostream.h. Here is an exmaple of what it looks like:

/usr/include/g++-3/streambuf.h:402: `_IO_read_ptr' undeclared (first use in
this function)
/usr/include/g++-3/streambuf.h:402: `_IO_read_end' undeclared (first use in
this function)
/usr/include/g++-3/streambuf.h: At top level:
/usr/include/g++-3/streambuf.h:403: parse error before `ios'
/usr/include/g++-3/streambuf.h:404: parse error before `...'
/usr/include/g++-3/streambuf.h:406: parse error before `...'
/usr/include/g++-3/streambuf.h:411: syntax error before `streamsize'
/usr/include/g++-3/streambuf.h:412: syntax error before `streamsize'
/usr/include/g++-3/streambuf.h:413: syntax error before `streampos'
/usr/include/g++-3/streambuf.h:413: parse error before `_seek_dir'
/usr/include/g++-3/streambuf.h:414: syntax error before `int'
/usr/include/g++-3/streambuf.h:415: syntax error before `int'
/usr/include/g++-3/streambuf.h:417: syntax error before `int'
/usr/include/g++-3/streambuf.h:418: syntax error before `void'
/usr/include/g++-3/streambuf.h:420: parse error before `}'
/usr/include/g++-3/streambuf.h:425: parse error before `filebuf'
/usr/include/g++-3/streambuf.h:430: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:431: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:432: conflicting types for `filebuf'
/usr/include/g++-3/streambuf.h:431: previous declaration of `filebuf'
/usr/include/g++-3/streambuf.h:432: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:436: parse error before `~'
/usr/include/g++-3/streambuf.h:437: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:438: parse error before `*'
/usr/include/g++-3/streambuf.h:438: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:439: parse error before `*'
/usr/include/g++-3/streambuf.h:439: parse error before `ios'
/usr/include/g++-3/streambuf.h:439: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:440: syntax error before `int'
/usr/include/g++-3/streambuf.h:441: syntax error before `int'
/usr/include/g++-3/streambuf.h:441: parse error before `='
/usr/include/g++-3/streambuf.h: In function `is_open':
/usr/include/g++-3/streambuf.h:442: parse error before `{'
/usr/include/g++-3/streambuf.h:443: `_fileno' undeclared (first use in this
function)
/usr/include/g++-3/streambuf.h: At top level:
/usr/include/g++-3/streambuf.h:444: parse error before `*'
/usr/include/g++-3/streambuf.h:444: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:445: syntax error before `int'
/usr/include/g++-3/streambuf.h:446: syntax error before `streampos'
/usr/include/g++-3/streambuf.h:446: parse error before `_seek_dir'
/usr/include/g++-3/streambuf.h:447: parse error before `streambuf'
/usr/include/g++-3/streambuf.h:447: warning: data definition has no type or
storage class
/usr/include/g++-3/streambuf.h:450: syntax error before `int'

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux