|
From: SourceForge.net <no...@so...> - 2003-03-18 16:23:13
|
Bugs item #664369, was opened at 2003-01-08 08:16 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=664369&group_id=2435 Category: MinGW Group: Known bugs >Status: Pending >Resolution: Later Priority: 5 Submitted By: Terje Slettebø (tslettebo) Assigned to: Earnie Boyd (earnie) Summary: Missing wide character support in MinGW 3.2? Initial Comment: Hi. I've tried searching the mingw-users mailing list archive, but it appears the search function doesn't work, now, so therefore I'm posting, here. When trying to compile a program that uses std::wstring, I get a link-error about missing definition. std::string works fine, though. I've used MinGW 3.2 that comes with Dev-C++. It appears to be a MinGW related problem, as I've heard from others who had the same problem. Also, when testing for _GLIBCPP_USE_WCHAR_T on MinGW, it's conspicuously absent, and, searching on Google, I found this posting (http://www.geocrawler.com/mail/msg.php3? msg_id=9057201&list=6013) from June, 2002: "wide char streams aren't fully supported yet in new libstdc++.a. I'm working on it." Is this still the case? I've heard that GCC 3.2, with library, now supports wide characters. Regards, Terje ---------------------------------------------------------------------- >Comment By: Earnie Boyd (earnie) Date: 2003-03-18 11:35 Message: Logged In: YES user_id=15438 Well, it needs more work. I.E. Someone needs to implement with a patch to GCC. Earnie. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2003-03-18 11:29 Message: Logged In: YES user_id=15438 Now the vfwscanf, vswscanf, and vwscanf abort is a bug in cwchar that should have used _GLIBCPP_HAVE_VFWSCANF, _GLIBCPP_HAVE_VSWSCANF and _GLIBCPP_HAVE_VWSCANF to filter their use. Then mingw32/btis/c++config.h can be changed to define _GLIBCPP_USE_WCHAR_T. Earnie. ---------------------------------------------------------------------- Comment By: Steve Lhomme (robux4) Date: 2003-03-18 10:39 Message: Logged In: YES user_id=53329 This very simple example gives the following error : #include <string> int main(int argc, char *argv[]) { std::wstring TestString; return 0; } main.o(.text+0x26):main.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()' main.o(.text+0x35):main.cpp: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()' PS: #define _GLIBCPP_USE_WCHAR_T 1 add the following errors : g++.exe -c main.cpp -o main.o -I"D:/DEV-CPP/include" -I"D:/DEV-CPP/include/c++" -I"D:/DEV-CPP/include" -I"D:/Dev-Cpp/include/c++/mingw32" In file included from D:/DEV-CPP/include/c++/bits/fpos.h:45, from D:/DEV-CPP/include/c++/bits/char_traits.h:46, from D:/DEV-CPP/include/c++/string:47, from main.cpp:2: D:/DEV-CPP/include/c++/cwchar:157: `vfwscanf' not declared D:/DEV-CPP/include/c++/cwchar:159: `vswscanf' not declared D:/DEV-CPP/include/c++/cwchar:161: `vwscanf' not declared ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2003-03-18 09:57 Message: Logged In: YES user_id=15438 Perhaps this will resolve the issue #define _GLIBCPP_USE_WCHAR_T 1 #include <string> Earnie. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2003-03-18 09:51 Message: Logged In: YES user_id=15438 None of you give a small example. Where's the example? Earnie. ---------------------------------------------------------------------- Comment By: Nigel Stewart (nigels) Date: 2003-03-18 09:08 Message: Logged In: YES user_id=338692 This problem is also observed in Cygwin. A solution to this would be much appreciated. Regards, Nigel Stewart ---------------------------------------------------------------------- Comment By: Steve Lhomme (robux4) Date: 2003-03-18 08:58 Message: Logged In: YES user_id=53329 I'm having the same problem. This problem also exist in gcc-darwin (used in OSX). But this code works under Linux+GCC 3.2 (Mandrake 9.0). Do you plan to solve it someday ? How is GCC supposed to handle Unicode handling otherwise ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=664369&group_id=2435 |