X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=g7twnGcSy4fWAmk0dIGhJzyhJhwVkBEft1R7BCQ/Epw=; b=sFNMCJE0FIYkT1MOmbA2BBtmpGt0MbBC3wvZV6jIHNBrkZFY1S4jyOMRYFgX4N5van znp6bNiOIr27UT1EDYtG6yu3CGTKXs+IuxWtIM7u5y+MYhErYU6XUOFTXRqYSC+ecbTv Z+HaP0Z4yM26AJUqo7espx4FxfawNvjZYNX8FL7oDJNDwTZk1w1z5cQGTMffbOpq7k7a Bf9YyRRruhOkC82VoRikVgXOrkaoK+J7IT6MI+pPowHcIxabv7F1DebtH0OpWZriFhlz K7ldNo5VRhTyqnBdBOpj61FaPwGXgfi1ve0xZrsR1xkOeP5Hg/3T4KqfNe+i0jfMGKBJ AI4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=g7twnGcSy4fWAmk0dIGhJzyhJhwVkBEft1R7BCQ/Epw=; b=YAiSSd5eNzED/pYQWpXObsMieYcTbuhlHMi7wnnRIkdgHYazbEu8MEGq75qpnNPtQ+ 00eZNvgheQCFHgw2nS70ZDaqZSldH9M5a/dcJjtQU52VwftrTg9H9XEiwtbD6waDgM3h HlhnGBrVJmiW11AR1hv1mygaGzNDfWwPC43cpu25wtptv8LWNLF2FTzUPjqweQZN8ZvU fpAoIt5tfLmE/q2+QRzhJNkGnKel0C+BdwZMH0eU9Tdkhj55X61TUqP+Q141HrsSuerm 4co4+evSdQaSzRpW1KEx/PEiDSdYifUchHbtnzjzdLySv2j2Gg6G54cSSOS8+uxaoIEY Mn6A== X-Gm-Message-State: AIVw111/0JDuGNZSES4YsLV7+on8IznQVipy3XgPOxOQdP20HMnvT0As yIdt9Z75mJ1PzKawFKuGTmlBMuTv0c6c X-Received: by 10.223.172.211 with SMTP id o77mr9047251wrc.201.1500641812361; Fri, 21 Jul 2017 05:56:52 -0700 (PDT) MIME-Version: 1.0 From: "Andrew Wu (andrewwu DOT tw AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Fri, 21 Jul 2017 20:56:51 +0800 Message-ID: Subject: DJGPP doesn't support std::wstring? To: "djgpp AT delorie DOT com" Content-Type: text/plain; charset="UTF-8" Reply-To: djgpp AT delorie DOT com Hello, I found the following code : #include int main() { std::string s; std::wstring w; return 0; } DJGPP 7.1.0 can't compile it. DJGPP will report: test.cpp: In function 'int main()': test.cpp:5:6: error: 'wstring' is not a member of 'std' std::wstring w; ^~~~~~~ test.cpp:5:6: note: suggested alternative: 'isprint' std::wstring w; ^~~~~~~ isprint Other versions of DJGPP also have the same problem. It seems DJGPP doesn't support std::wstring? I checked DJGPP header files, I found in \djgpp\include\cxx\7\bits\stringfwd.h , there is : #ifdef _GLIBCXX_USE_WCHAR_T /// A string of @c wchar_t typedef basic_string wstring; #endif And in \djgpp\include\cxx\7\debug\string , there is : #ifdef _GLIBCXX_USE_WCHAR_T typedef basic_string wstring; #endif So, I think it is needed to define _GLIBCXX_USE_WCHAR_T to declare wstring class in the header files. But this symbol is not defined in \djgpp\include\cxx\7\djgpp\bits\cxxconfig.h : /* Define if code specialized for wchar_t should be used. */ /* #undef _GLIBCXX_USE_WCHAR_T */ So wstring class is not declared. If I use cxx -D_GLIBCXX_USE_WCHAR_T to define it, DJGPP will report other more problems. Any method to support wstring in DJGPP? This problem is originally from : https://github.com/andrewwutw/build-djgpp/issues/16