This is the mail archive of the cygwin mailing list for the Cygwin 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: wstring, how?

At 06:31 PM 10/23/2004, you wrote:
>Larry Hall wrote:
>>At 07:44 PM 10/22/2004, you wrote:
>>>#include <string>
>>>std::wstring wstr;   //<<== syntax error before ; token
>>>g++ -Wall -g -c program.exe -o filename.cpp
>>>Can someone tell me what I am dong wrong or why I get this error message?
>>Presuming you're using the latest Cygwin gcc/g++ release (3.3.3), take a look at /usr/include/g++-3/string and I think you'll find your answer.
>>You can add the wstring typedef yourself and then things compile fine, assuming you fix the 'typo' of the missing class name.
>>Gerrit, do you know why <string> has the wstring typedef commented out?
>wchar_t and wstring are not in newlib and so they are not in cygwin.

Yeah, I thought of that but then I grepped through newlib and there seemed
to be plenty of references to it.  Then I added:

namespace std {
typedef std::basic_string <wchar_t> wstring;

after the '#include <string>' above, fixed the typo to add a class name,
and things compiled fine for me.  So it seems to me like newlib is not 
the bottleneck for wide character support.  Or did I miss something?

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     

Unsubscribe info:
Problem reports:

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