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/