I am using Red Hat Linux release 9 Kernel 2.4.20-8 on an i686 with gcc version 2.96. In my code I am declaring like,
std::locale utf8_locale;
I am getting this error:
syntax error before `;'
Please suggest me with a solution.
I am using Red Hat Linux release 9 Kernel 2.4.20-8 on an i686 with gcc version 2.96. In my code I am declaring like,
std::locale utf8_locale;
I am getting this error:
syntax error before `;'
Please suggest me with a solution.
Linux 2.4.20 came out in November 2002.
GCC 3.0.4 came out in February 2002. There never was an official 2.96; 2.96 was an internal development version which is both forward and backward incompatible in its binary formats, and presumably was never guaranteed to work the way either GCC 2.95.x or 3.0 was.
Judging by the file dates on the ISOs, Red Hat Linux 9 was assembled in early 2003. Wikipedia agrees and claims a release date of March 31, 2003.
All of these are comparatively ancient.
I'm willing to bet that GCC's C++ support (both for namespaces and others, and almost certainly its C++ standard library) has been vastly improved in the last twelve or so years, and would strongly suggest that your first attempt at finding a solution should be to build your code using a more modern version of the compiler and standard library. Don't expect anything modern to build using a ten-plus-years old compiler (I'm not even sure std::locale
hasn't been introduced since then).
If that does not help, you should look at the surrounding lines and any surrounding errors. Many times, an earlier error can throw the compiler off track causing it to spew out errors that really aren't there any more than as consequences of a past parse error. Fix any earlier errors before you tackle later ones.