This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: parse errors
- From: LLeweLLyn Reese <llewelly at lifesupport dot shutdown dot com>
- To: dunk at dunkfordyce dot co dot uk
- Cc: gcc-help at gcc dot gnu dot org
- Date: 15 Mar 2003 06:15:18 -0800
- Subject: Re: parse errors
- References: <20030315103857.5bc1ef8e.dunk@dunkfordyce.co.uk>
- Reply-to: gcc-help at gcc dot gnu dot org
dunk at dunkfordyce dot co dot uk writes:
> hello, i installed gcc 3.2.2 on my LFS box and seem to have some problems.
> almost everything compiles fine but the apps/libs that wont compile fail with the same sort of error so i am beginning to think ive broken something.
>
> the errors i get from projects all seem to be:
> parse error before <some token> token
>
> at least these always seem to be the first errors.
>
> checking the code where these errors are provides no clues, the code looks fine as far as i can tell.
>
> below is what make reports when trying to build tism ( a tcl music app )
> i can include more just like it ;) but my gut feeling says that its
> probably more todo with gcc setup/compiliation/configuration than
> the actual projects.
[snip]
These errors indicate that the code does not namespace qualify
standard library components correctly. Example:
int main()
{
cout << "Hello world" << endl;
}
must become:
int main()
{
std::cout << "Hello world" << std::endl;
}
or:
using std::cout;
using std::endl;
int main()
{
cout << "Hello world" << endl;
}
or:
using namespace std;
int main()
{
cout << "Hello world" << endl;
}
Email the developers of these projects.