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: problems with std::wstring on Solaris



I assume you're talking about PR 6702 :
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&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_cwchar.h and gcc-3.2/libstdc++-v3/include/c_std/std_cwctype.h libstdc++ compiled and installed fine.

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 we use.

$ gcc -v
Reading specs from /users/afeick/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs
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-ld=/users/afeick/local/bin/ld -
-with-gnu-as --with-as=/users/afeick/local/bin/as --disable-libgcj
Thread model: posix
gcc version 3.2


From: Benjamin Kosnik <bkoz@redhat.com>
To: "Anthony Feick" <afeick@hotmail.com>
CC: libstdc++@gcc.gnu.org
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.

-benjamin



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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