This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compile problems / Error in locale_classes.h


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]