This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11312] New: GCC (g++) does not support std::wstring or other wchar_t based types
- From: "branko at neobee dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2003 19:31:58 -0000
- Subject: [Bug libstdc++/11312] New: GCC (g++) does not support std::wstring or other wchar_t based types
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11312
Summary: GCC (g++) does not support std::wstring or other wchar_t
based types
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P1
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: branko at neobee dot net
CC: gcc-bugs at gcc dot gnu dot org
PLATFORM
Hardware: Sun Ultra 10 (UltraSPARC-IIi)
OS: Solaris 8
GCC: 3.3
bash-2.03# g++ -v
Reading specs from /opt/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.8/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/opt/gcc-3.3
Thread model: posix
gcc version 3.3
DESCRIPTION
There seems to be a lack of support for std::wstring in C++ component of GNU
Compiler Collection. I am new to GCC, but I suppose this is problem with
standard library that comes with GCC.
STEPS TO REPRODUCE
An attempt to compile a trivial program:
#include <string>
int main() {
std::wstring s;
}
gives a compile error:
bash-2.03# g++ main.cpp
main.cpp: In function `int main()':
main.cpp:4: error: `wstring' undeclared in namespace `std'
main.cpp:4: error: parse error before `;' token
Also tried on GCC 3.3 / Cygwin and MinGW 3.2, with similar results. GCC/Cygwin
gives identical compilation errors, while MinGW fails to link:
D:\wstring_bug>g++ -v
Reading specs from E:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specsConfigured
with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --
target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-
languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)
D:\wstring_bug>g++ main.cpp
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckhbaaa.o(.text+0x26):main.cpp: undefined
reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::basic_string()'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cckhbaaa.o(.text+0x35):main.cpp: undefined
reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::~basic_string()'
NOTE
Internet search revealed numerous occurrences of the same problem on many
different platforms.