This is the mail archive of the
mailing list for the libstdc++ project.
Re: problems with std::wstring on Solaris
- From: "Anthony Feick" <afeick at hotmail dot com>
- To: bkoz at redhat dot com
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 22 Aug 2002 12:36:19 -0500
- Subject: Re: problems with std::wstring on Solaris
I assume you're talking about PR 6702 :
When I did that and tried to recompile libstdc++, I had problems with
iswblank, vfwscanf, vswscanf, vwscanf, and wcstof. (Probably the reason
GLIBCPP_USE_WCHAR_T was off.) After I commented those out in
gcc-3.2/libstdc++-v3/include/c_std/std_cwctype.h libstdc++ compiled and
Unfortunately, now basic_string::push_back gives a Segfault wmemset () from
/usr/lib/libc.so.1. I assume this means I am now doing something
incompatible with the system libraries.
This just seems unusual. I had been using gcc 3.0.4 and libstdc++-v3.0.96
perfectly on Solaris once I commented out iswblank. Would I be better using
ibstdc++-v3.0.96 with gcc 3.2?? The reason I'm doing the upgrade anyway is
to get a standard release, and have the same gcc on all of the (UNIX) OSes
$ gcc -v
Reading specs from
Configured with: ../gcc-3.2/configure --prefix=/users/afeick/local
--enable-threads=posix --enable-shared --enab
le-cxx-flags=-fshort-wchar --disable-multilib --disable-nls --with-gnu-ld
-with-gnu-as --with-as=/users/afeick/local/bin/as --disable-libgcj
Thread model: posix
gcc version 3.2
From: Benjamin Kosnik <firstname.lastname@example.org>
To: "Anthony Feick" <email@example.com>
Subject: Re: problems with std::wstring on Solaris
Date: Wed, 21 Aug 2002 11:14:33 -0700
> $ g++ test.cpp
> /var/tmp//ccNdHTuR.o: In function `main':
> /var/tmp//ccNdHTuR.o(.text+0xf4): undefined reference to
> `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocato
> r<wchar_t> >::basic_string[in-charge]()'
> /var/tmp//ccNdHTuR.o(.text+0x100): undefined reference to
> `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocat
> or<wchar_t> >::~basic_string [in-charge]()'
> collect2: ld returned 1 exit status
> "std:string" works, but "std::wstring" and "std::basic_string<wchar_t>"
> don't link.
look for GLIBCPP_USE_WCHAR_T in c++config.h
It will be off on solaris. There's a bug in GNATS about this.
Send and receive Hotmail on your mobile device: http://mobile.msn.com