delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Subject: | Wide Character support in Cygwin |
Date: | Mon, 30 Apr 2007 21:32:56 +0530 |
Message-ID: | <141D986BB4749448AB843778A4DD236B04654F03@kormail02.in.bosch.com> |
In-Reply-To: | <46360AAD.4010308@cygwin.com> |
From: | "Tejesh C (RBIN/ECM2)" <Tejesh DOT Chintamani AT in DOT bosch DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id l3UG3C5P018047 |
Hi All, Is the wide character support for GCC available in Cygwin We have tried to compile a piece of code which works on SLES 9 LINUX But the same code throws errors when compiled on cygwin. Can any one please suggest how to solve this problem The following is the code : #include<iostream> #include<ostream> #include<sstream> int main ( ) { using namespace std; float f= 3.14159; const wchar_t* s= L"Kenavo !"; // create a read/write stringbuf object on wide char // and attach it to an wistringstream object wistringstream in( ios_base::in | ios_base::out ); // tie the wostream object to the wistringstream object wostream out(in.rdbuf()); out << L"test beginning !" << endl; // output f in scientific format out << scientific << f <<endl; // store the current put-pointer position wostream::pos_type pos = out.tellp(); // output s out << s << endl; // output the all buffer to standard output wcout << in.rdbuf() << endl; // position the get-pointer in.seekg(pos); // output s wcout << in.rdbuf() << endl; return 0; } The error I get on cygwin is : $ g++ wstreamtest.cpp wstreamtest.cpp: In function `int main()': wstreamtest.cpp:17: error: `wistringstream' undeclared (first use this function) wstreamtest.cpp:17: error: (Each undeclared identifier is reported only once for each function it appears in.) wstreamtest.cpp:17: error: expected `;' before "in" wstreamtest.cpp:20: error: `wostream' undeclared (first use this function) wstreamtest.cpp:20: error: expected `;' before "out" wstreamtest.cpp:22: error: `out' undeclared (first use this function) wstreamtest.cpp:28: error: `wostream' has not been declared wstreamtest.cpp:28: error: `pos_type' undeclared (first use this function) wstreamtest.cpp:28: error: expected `;' before "pos" wstreamtest.cpp:34: error: `wcout' undeclared (first use this function) wstreamtest.cpp:34: error: `in' undeclared (first use this function) wstreamtest.cpp:37: error: `pos' undeclared (first use this function) Please let me know if you require further information Regards CT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |