LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-02-2005, 05:38 AM   #1
maheshbmane
LQ Newbie
 
Registered: Sep 2005
Location: India
Posts: 5

Rep: Reputation: 0
error in gcc / g++ standard file


Please resolve the following gcc compiler error in /usr/include/c++/3.2.3/bits/fstream.tcc

In file included from /usr/include/c++/3.2.3/fstream:576,
/usr/include/c++/3.2.3/bits/fstream.tcc: In member function `virtual
_Traits::pos_type std::basic_filebuf<_CharT,
_Traits>::seekoff(_Traits::off_type, std::_Ios_Seekdir,
std::_Ios_Openmode)':
/usr/include/c++/3.2.3/bits/fstream.tcc:455: syntax error before `this'


It is the same error with g++ also. I am using the version is

Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
 
Old 09-02-2005, 06:09 AM   #2
TheGiantPotato
Member
 
Registered: Dec 2003
Location: Kansai, Japan
Distribution: LFS, FedoraCore
Posts: 35

Rep: Reputation: 15
And the source you were compiling is... ?

Can you post the code you were trying to compile that included fstream?
 
Old 09-02-2005, 06:26 AM   #3
maheshbmane
LQ Newbie
 
Registered: Sep 2005
Location: India
Posts: 5

Original Poster
Rep: Reputation: 0
This error is in

/usr/include/c++/3.2.3/bits/fstream.tcc:455: [B]syntax error before `this'[B]

on line 455

I have included <fstream> ( /usr/include/c++/3.2.3/fstream) internally which might call fstream.tcc
 
Old 09-02-2005, 06:47 AM   #4
maheshbmane
LQ Newbie
 
Registered: Sep 2005
Location: India
Posts: 5

Original Poster
Rep: Reputation: 0
error in gcc / g++ standard file

Please resolve the following gcc / g++ compiler error in /usr/include/c++/3.2.3/bits/fstream.tcc

In file included from /usr/include/c++/3.2.3/fstream:576,
/usr/include/c++/3.2.3/bits/fstream.tcc: In member function `virtual
_Traits::pos_type std::basic_filebuf<_CharT,
_Traits>::seekoff(_Traits::off_type, std::_Ios_Seekdir,
std::_Ios_Openmode)':
/usr/include/c++/3.2.3/bits/fstream.tcc:455: syntax error before `this'


I am using the version :

Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)


I am calling </usr/include/c++/3.2.3/fstream> internally which might be calling </usr/include/c++/3.2.3/bits/fstream.tcc> , the error is in </usr/include/c++/3.2.3/bits/fstream.tcc> on line 455
 
Old 09-02-2005, 08:23 AM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
My guess is your error is a brace or a semi-colon missing before the call to that fstream.
 
Old 09-02-2005, 04:03 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

This thread has been moved to Programming to be merged with http://www.linuxquestions.org/questi...hreadid=359442
 
Old 09-02-2005, 08:30 PM   #7
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 42
often you'll get errors in a system header which is included after one of your own headers, which contains a syntax error. As jtshaw suggested, a missing ; after a function prototype or struct definition is common.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc: installation problem, cannot exec `cc1': No such file or directory Error Message 08h Programming 2 07-20-2006 11:44 AM
How do I forward standard and error output into same file? ivj Linux - Software 5 07-19-2005 08:30 PM
GCC Make error on Solarias 2.8: libc.a unknown file type vinaybms Solaris / OpenSolaris 1 06-20-2005 01:56 AM
Use gcc and standard libraries with SUSE 9.1 Personal warrenpatrick Linux - Newbie 3 10-10-2004 07:26 PM
GCC doesn't find the Standard-Library the_styler Linux - Software 11 01-15-2004 08:09 PM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration