Compile problems / Error in locale_classes.h

Jonathan Wakely jwakely.gcc@gmail.com
Fri Oct 22 07:12:00 GMT 2010


On 22 October 2010 06:50, Satz Klauer <satzklauer@googlemail.com> wrote:
> Hi,
>
> I have a problem within a large project. The funny thing is, the
> project compiles without problems when using gcc/libstdc++ 4.1.2 but
> fails when I use gcc/libstdc++ 4.4.4. With this newer version I get a
> compile error that seems to be caused by locale_classes.h:
>
> /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/locale_classes.h:45:
> Error: expected »{« before »(« token
> /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/locale_classes.h:45:
> Error: expected »)« before »(« token
> /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/locale_classes.h:45:
> Error: expected »)« before »(« token
>
> At this line there is nothing more than _GLIBCXX_BEGIN_NAMESPACE(std)
> and the header itself is included using following path:
>
> In file included from
> /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/ios_base.h:44,
> from /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/ios:44,
> from /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/istream:41,
> from /usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../include/c++/4.4.4/sstream:40,
> ... (here my own includes follow)
>
> What could be the reason for this, what has changed in libstdc++ to
> cause these problems?

Can you provide a minimal test case, reduced to the smallest example
that still fails?

Presumably it doesn't fail if you just do

#include <sstream>
int main() { }

If that works, but your real program doesn't, then you must be doing
something different, such as including internal library headers or
defining macros meant for the library's internal use.



More information about the Libstdc++ mailing list