parse errors
LLeweLLyn Reese
llewelly@lifesupport.shutdown.com
Sat Mar 15 17:33:00 GMT 2003
dunk@dunkfordyce.co.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.
More information about the Gcc-help
mailing list