This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Compile problems / Error in locale_classes.h
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Satz Klauer <satzklauer at googlemail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 22 Oct 2010 08:11:55 +0100
- Subject: Re: Compile problems / Error in locale_classes.h
- References: <AANLkTimxxpwyeeO0fQX2o+6U3fhuu0WNb0kGb6sk4gs0@mail.gmail.com>
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.