From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14630 invoked by alias); 2 May 2004 18:22:52 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 14613 invoked from network); 2 May 2004 18:22:50 -0000 Received: from unknown (HELO oakmsexch.seiu790.org) (208.176.10.42) by sources.redhat.com with SMTP; 2 May 2004 18:22:50 -0000 Received: by OAKMSEXCH with Internet Mail Service (5.5.2653.19) id ; Sun, 2 May 2004 11:21:56 -0700 Message-ID: <970544669F9C4844B487DC8CEBCF933AF51D40@OAKMSEXCH> From: Boyan Biandov To: "'gcc-help@gcc.gnu.org'" Subject: streambuf.h:403: parse error before `ios' Date: Sun, 02 May 2004 18:22:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2004-05/txt/msg00009.txt.bz2 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 #include #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'