Compile problems / Error in locale_classes.h

Satz Klauer satzklauer@googlemail.com
Fri Oct 22 05:51:00 GMT 2010


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?

I of course can't remove the

#include <sstream>

in this case compilation simply fails at a different position where
the definitions of sstream are required...

Mike



More information about the Libstdc++ mailing list