Re: GCC 4.2 parse error in stl_algobase.h: "current namespace 'std' does not enclose..."
Re: GCC 4.2 parse error in stl_algobase.h: "current namespace 'std' does not enclose..."
- Subject: Re: GCC 4.2 parse error in stl_algobase.h: "current namespace 'std' does not enclose..."
- From: Chris Espinosa <email@hidden>
- Date: Tue, 25 Aug 2009 15:38:47 -0700
On Aug 25, 2009, at 3:26 PM, Jens Alfke wrote:
I have a small C++ based project that I created from the "C++ Tool"
template last week. I just switched its compiler version from GCC
4.0 to 4.2. Now the Release config builds, but the Debug config
fails with a compile error when I #include <algorithm>:
In file included from /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/
4.0.0/bits/stl_algobase.h:64,
from /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/
4.0.0/algorithm:65,
from /Code/SafeStorage/Hash.cpp:12:
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-
darwin9/bits/c++config.h:79: error: current namespace 'std' does not
enclose strongly used namespace '__gnu_debug_def'
The line in <stl_algobase.h> where the error occurs is:
using namespace __gnu_debug_def __attribute__ ((strong));
The GCC version string is "i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1
(Apple Inc. build 5574)". I've got Xcode 3.1.3, which I believe is
the latest. This is on a MBP running 10.5.8. Any suggestions?
a) use the 10.6 SDK with gcc 4.2
b) use the 10.5 SDK with gcc 4.0
c) don't use C++
I expect you'll choose a) or b)
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden