Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Bruce Reid" To: Subject: Is wchar_t support possible with Cygwin/GCC? Date: Mon, 11 Mar 2002 18:11:40 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0010_01C1C928.315B5AF0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 ------=_NextPart_000_0010_01C1C928.315B5AF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit My reliance on GCC/Cygwin includes the following: 1) App must be able to be built/run on: Linux, Solaris, and Cygwin 2) App needs Xerces-C XML parser, which includes unicode support, and I must be able to build/link the library on all three platforms. I did initial development on Solaris, then later ported to Linux. Both of these were relatively painless (both configurations are well supported by the Xerces development team; since Cygwin is not so well supported, I'm treading a path not many others have used, according to info available from the Xerces-C mailing list.) Prior to the recent introduction of the Xerces-C library into my application, I was able to build it successfully under Cygwin using the gcc 2.95 binary that came bundled with Cygwin. Now, when trying to build the Xerces library on Cygwin, I'm running into trouble with a file that tries to include wctype.h (file not found.) Thinking that improvements since GCC 2.95 may have solved the problem, I obtained the latest GCC release (3.0.4, full package), and built it successfully, though the build process produced a message indicating that wctype.h is missing, and wchar_t support is disabled. I have searched from the Cygwin root directory (which encompasses GCC) for any file containing the text 'wctype', and have found one instance of wctype.h, and several other related files in various subdirectories. Still, I can't successfully compile a source file containing #include (or #include ), and thus some required function prototypes are missing. I've attached a text file contining pertinent info about my platform, the GCC configure/build process, the locations of the '*wctype*' files present on my system, errors produced by attempting to compile my test file, code snippets extracted from the troublesome source file necessitating the inclusion of wctype.h, etc. I hope I'm not off-topic here; I did first try posting to gnu-libstdc++, but have not heard anything yet. If anyone can tell me whether it's possible to get GCC/Cygwin to properly support wide characters, and if so, what steps I need to take to do so, I will be extremely grateful. Sincerely, Bruce Reid ------=_NextPart_000_0010_01C1C928.315B5AF0 Content-Type: text/plain; name="gccinfo.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gccinfo.txt" $ gcc -v Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/specs Configured with: /downloads/gnu/gcc/gcc-3.0.4/configure --verbose = --enable-languages=3Dc,c++ --disable-libgcj --enable-threads=3Dwin32 = --disable-shared --disable-nls --with-as=3D/usr/bin/as = --with-ld=3D/usr/bin/ld Thread model: win32 gcc version 3.0.4 $ /downloads/gnu/gcc/gcc-3.0.4/config.guess i686-pc-cygwin # A problem indication extracted from the output of the gcc build = process # checking for wchar.h... yes checking for wctype.h... no configure: warning: wchar_t support disabled. # Result of compiling a file containing '#include # $ g++ -Wall -o test test.cpp test.cpp:4:20: wctype.h: No such file or directory # Result of compiling a file containing '#include # $ g++ -Wall -o test test.cpp In file included from /usr/local/include/g++-v3/cwctype:31, from test.cpp:4: /usr/local/include/g++-v3/bits/std_cwctype.h:38:20: wctype.h: No such = file or directory In file included from /usr/local/include/g++-v3/cwctype:31, from test.cpp:4: /usr/local/include/g++-v3/bits/std_cwctype.h:65: `wctype_t' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:66: `wctrans_t' not = declared /usr/local/include/g++-v3/bits/std_cwctype.h:68: `iswalnum' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:69: `iswalpha' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:70: `iswblank' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:71: `iswcntrl' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:72: `iswdigit' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:73: `iswgraph' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:74: `iswlower' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:75: `iswprint' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:76: `iswprint' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:77: `iswpunct' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:78: `iswspace' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:79: `iswupper' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:80: `iswxdigit' not = declared /usr/local/include/g++-v3/bits/std_cwctype.h:81: `iswctype' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:82: `towlower' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:83: `towupper' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:84: `towctrans' not = declared /usr/local/include/g++-v3/bits/std_cwctype.h:85: `wctrans' not declared /usr/local/include/g++-v3/bits/std_cwctype.h:86: `wctype' not declared # Locations of files related to wctype # $ find / -name '*wctype*' /builds/gcc-3.0.4/i686-pc-cygwin/libstdc++-v3/include/bits/std_cwctype.h /builds/gcc-3.0.4/i686-pc-cygwin/libstdc++-v3/include/cwctype /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/include/c/bits/std_cwctype.h /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/include/c_shadow/bits/std_cwcty= pe.h /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/include/c_shadow/wctype.h /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/include/c_std/bits/std_cwctype.= h /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/include/std/cwctype /downloads/gnu/gcc/gcc-3.0.4/libstdc++-v3/testsuite/17_intro/header_cwcty= pe.cc /usr/include/g++-3/cwctype /usr/local/include/g++-v3/bits/std_cwctype.h /usr/local/include/g++-v3/cwctype # Snippets of code necessitating the inclusion of wctype.h. # const XMLCh* cptr1 =3D comp1; wint_t wch1 =3D towupper(*cptr1); ^^^^^^^^ bool IconvTransService::isSpace(const XMLCh toCheck) const { return (iswspace(toCheck) !=3D 0); ^^^^^^^^ } ------=_NextPart_000_0010_01C1C928.315B5AF0 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------=_NextPart_000_0010_01C1C928.315B5AF0--