This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
_GLIBCPP_USE_WCHAR_T undefined in FreeBSD's c++config.h?
- From: Craig Rodrigues <rodrigc at attbi dot com>
- To: gcc at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 19 Feb 2003 12:45:38 -0500
- Subject: _GLIBCPP_USE_WCHAR_T undefined in FreeBSD's c++config.h?
Hi,
I am not sure if this issue falls under the jurisdiction of
the gcc@ or libstdc++@ mailing lists so I am posting to both.
I am running FreeBSD:
uname -a
FreeBSD 5.0-CURRENT #15
If I bootstrap gcc 3.3 branch, I notice that
include/c++/3.3/i386-unknown-freebsd5.0/bits/c++config.h
does not define _GLIBCPP_USE_WCHAR_T as it does under Linux.
This makes it impossible to compile the following snippet of
code:
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
std::wstring a;
return 0;
}
a.cc: In function `int main(int, char**)':
a.cc:7: error: `wstring' undeclared in namespace `std'
a.cc:7: error: parse error before `;' token
The reason for this is because in include/c++/3.3/bits/stringfwd.h,
we have:
#ifdef _GLIBCPP_USE_WCHAR_T
template<> struct char_traits<wchar_t>;
typedef basic_string<wchar_t> wstring;
#endif
What is the solution for this?
Thanks.
--
Craig Rodrigues
http://home.attbi.com/~rodrigc
rodrigc at attbi dot com