Return-Path: Delivered-To: apmail-stdcxx-user-archive@www.apache.org Received: (qmail 48995 invoked from network); 25 Nov 2008 00:09:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Nov 2008 00:09:45 -0000 Received: (qmail 56740 invoked by uid 500); 25 Nov 2008 00:09:55 -0000 Delivered-To: apmail-stdcxx-user-archive@stdcxx.apache.org Received: (qmail 56716 invoked by uid 500); 25 Nov 2008 00:09:55 -0000 Mailing-List: contact user-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@stdcxx.apache.org Delivered-To: mailing list user@stdcxx.apache.org Received: (qmail 56705 invoked by uid 99); 25 Nov 2008 00:09:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2008 16:09:55 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2008 00:08:27 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L4lUN-00028T-NF for user@stdcxx.apache.org; Mon, 24 Nov 2008 16:09:11 -0800 Message-ID: <20672758.post@talk.nabble.com> Date: Mon, 24 Nov 2008 16:09:11 -0800 (PST) From: Steve Petrie To: user@stdcxx.apache.org Subject: Building stdcxx-4.2.1 Using MinGW+MSYS On Windows XP (SP2) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: apetrie@attglobal.net X-Virus-Checked: Checked by ClamAV on apache.org Greetings, I am trying to build stdcxx-4.2.1 on Windows XP (SP2), using the MinGW(3.4.5) + MSYS(1.0.10) + (with gcc, g++, etc.) operating environment. Running make from an MSYS console. The MinGW + MSYS, etc. seems to be working OK, when used by the NetBeans 6.5 IDE C/C++ plugin. Using NetBeans 6.5 I have successfully compiled, linked and tested a couple of simple programs, that use cin and cout from the standard library shipped with the g++ that comes with MinGW. I have never tried to build anything directly with make before, let alone anything as complicated as the Apache C++ Standard Library. I've always used make through the intermediation of an IDE: Metrowerks CodeWarrior Microsoft VC++ 2005 Express NetBeans 6.5 C/C++ * * * * * * ( I have searched the Apache archive without success, for tips on building stdcxx-4.2.1 Using MinGW+MSYS, so I'm posting here. There was one page I found: http://mail-archives.apache.org/mod_mbox/xerces-c-dev/200708.mbox/%3C46CC9F94.60603@perforce.com%3E ... > Hi Charles, > > Charles McLouth writes: > >> As an FYI I tested the zip file with mingw-msys on windows and all built >> correctly and linked with the samples. Below is the specific configure >> options I used (even testing the new static option): >> runConfigure -p mingw-msys -c gcc -x g++ -m inmem -n winsock -t Win32 >> runConfigure -p mingw-msys -d -c gcc -x g++ -m inmem -n winsock -t Win32 >> runConfigure -p mingw-msys -s -c gcc -x g++ -m inmem -n winsock -t Win32 >> runConfigure -p mingw-msys -d -s -c gcc -x g++ -m inmem -n winsock -t Win32 > ... But so far as I can tell, this is referring to the ability of the Cygwin tools to generate mingw-msys compatible libraries, and not what I'm trying to do, which is to build stdcxx-4.2.1 using MinGW+MSYS On Windows XP. ) * * * * * * I'm running just plain make (with no command line parameters) at the MSYS console prompt, in $TOPDIR, which is /i/apps/stdcxx-4.2.1/ in MSYS (mapped from I:\APPS\stdcxx-4.2.1\ in Windows). So far I have found and worked around some incompatibilities between: (A) the GNUmakefile (616588 2008-01-30 02:10:55Z) shipped in stdcxx-4.2.1.tar.gz and (B) the "POSIX" environment emulated by MinGW+MSYS. Please see the sections below: ** GNUmakefile / MinGW+MSYS Incompatibility #1 ** thru ** GNUmakefile / MinGW+MSYS Incompatibility #5 ** for the fixes I have tried. At section: ** GNUmakefile / MinGW+MSYS Incompatibility #6 ** below, I decided that, given my inexperience with the exciting world of make and Standard Library building, I'd better get in touch with the experts who programmed the Apache C++ Standard Library library, and who have already successfully built it a few thoussand times. * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #1 ** The last line of the following code snippet from GNUmakefile (lines 542..546) fails: # harmonize all the different Intel IA32 chips PLATFORM := $(subst i486,i86,$(PLATFORM)) PLATFORM := $(subst i586,i86,$(PLATFORM)) PLATFORM := $(subst i686,i86,$(PLATFORM)) PLATFORM := $(shell echo $(PLATFORM) | tr "[:upper:]" "[:lower:]") so I commented the lines out and forced: PLATFORM := mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 (On my MSYS, the uname command prints: MINGW32_NT-5.1). * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #2 ** In the make-builddir function (lines 574..599) from GNUmakefile, the following snippet: ln -sf $(TOPDIR)/GNUmakefile $(buildpath); \ ** ln -sf $(ETCDIR)/GNUmakefile.cfg $(buildpath)/include/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.lib $(LIBDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.rwt $(buildpath)/rwtest/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.exm $(EXMDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.tst $(TSTDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.ph $(PHTSTDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.bin $(BINDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/makefile.common $(buildpath); \ ** ln -sf $(ETCDIR)/makefile.rules $(buildpath); \ ** ln -sf $(ETCDIR)/configure.sh $(buildpath)/include/configure; \ ln -sf $(BINDIR)/exec $(buildpath)/run; \ ln -sf $(BINDIR)/exec $(BINDIR)/run; \ ln -sf $(ETCDIR)/run_locale_utils.sh $(BINDIR)/run_utils; \ ln -sf $(BINDIR)/exec $(TSTDIR)/run; \ ln -sf $(BINDIR)/exec $(PHTSTDIR)/run; \ ln -sf $(BINDIR)/exec $(EXMDIR)/run has 3 ls commands (marked ** above) that specify a directory (i.e. that do not specify a file). These commands are of the form: ls -sf file dir and according to my UNIX book, for this form of the ls command: "ls creates a link in to . However, MSYS does NOT create a link IN but REPLACES with a link to , naming the link the same as . So when the above snippet in function make-builddir has finished executing, DIRECTORY /stdcxx-4.2.1/build/ has been replaced by a FILE /stdcxx-4.2.1/build linked to file /stdcxx-4.2.1/etc/config/makefile.rules I worked around this problem, by changing the 3 ls commands (marked ** above) so that they are of the form: ln -sf $(TOPDIR)/GNUmakefile $(buildpath)/GNUmakefile; \ ... ln -sf $(ETCDIR)/makefile.common $(buildpath)/makefile.common; \ ln -sf $(ETCDIR)/makefile.rules $(buildpath)/makefile.rules; \ ... * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #3 ** In the same make-builddir function (lines 574..599) as above, in the same snippet: ln -sf $(TOPDIR)/GNUmakefile $(buildpath); \ ln -sf $(ETCDIR)/GNUmakefile.cfg $(buildpath)/include/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.lib $(LIBDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.rwt $(buildpath)/rwtest/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.exm $(EXMDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.tst $(TSTDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.ph $(PHTSTDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/GNUmakefile.bin $(BINDIR)/GNUmakefile; \ ln -sf $(ETCDIR)/makefile.common $(buildpath); \ ln -sf $(ETCDIR)/makefile.rules $(buildpath); \ ln -sf $(ETCDIR)/configure.sh $(buildpath)/include/configure; \ ln -sf $(BINDIR)/exec $(buildpath)/run; \ ** ln -sf $(BINDIR)/exec $(BINDIR)/run; \ ** ln -sf $(ETCDIR)/run_locale_utils.sh $(BINDIR)/run_utils; \ ln -sf $(BINDIR)/exec $(TSTDIR)/run; \ ** ln -sf $(BINDIR)/exec $(PHTSTDIR)/run; \ ** ln -sf $(BINDIR)/exec $(EXMDIR)/run ** when the make-builddir function executes, the 5 ls commands (marked ** above) fail and display the following on the MSYS console: creating BUILDDIR=/stdcxx-4.2.1/build ln: creating symbolic link `/stdcxx-4.2.1/build/run' to `/stdcxx-4.2.1/build/bin/exec': No such file or directory ln: creating symbolic link `/stdcxx-4.2.1/build/bin/run' to `/stdcxx-4.2.1/build/bin/exec': No such file or directory ln: creating symbolic link `/stdcxx-4.2.1/build/tests/run' to `/stdcxx-4.2.1/build/bin/exec': No such file or directory ln: creating symbolic link `/stdcxx-4.2.1/build/plumhall/run' to `/stdcxx-4.2.1/build/bin/exec': No such file or directory ln: creating symbolic link `/stdcxx-4.2.1/build/examples/run' to `/stdcxx-4.2.1/build/bin/exec': No such file or directory I believe they fail because the directory /stdcxx-4.2.1/build/bin/ defined by the BINDIR variable BINDIR = $(buildpath)/bin contains no file called at the time that the ls commands execute. This problem I just ignored for the time being, because I didn't know what the file is supposed to contain. * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #4 ** In what appears to me to be another iteration of the GNUmakefile during its ececution, the following is displayed on the MSYS console: ... make[2]: Entering directory `/stdcxx-4.2.1/build/include' make config make[3]: Entering directory `/stdcxx-4.2.1/build/include' configuring stdcxx 4.2.1 for gcc-3.4.5 on mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 checking if the compiler is sane ok (invoked with gcc) checking if the linker is sane ok (invoked with gcc) checking system architecture ILP32 little endian /stdcxx-4.2.1/etc/config/src/libc_decl.sh: ./vars.sh: line 39: syntax error near unexpected token `PLATFORM=mingw32_nt-5.1-1.0.10(0' /stdcxx-4.2.1/etc/config/src/libc_decl.sh: ./vars.sh: line 39: `PLATFORM=mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 ; export PLATFORM' checking for no (_RWSTD_NO_CASSERT) checking for ok ("i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/assert.h") checking for no (_RWSTD_NO_CCTYPE) checking for ok ("i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/ctype.h") checking for no (_RWSTD_NO_CERRNO) checking for ok ("i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/errno.h") ... Lines 38..40 of file /stdcxx-4.2.1/build/include/vars.sh are: ... BUILDTAG= ; export BUILDTAG PLATFORM=mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 ; export PLATFORM DEFAULT_SHROBJ= ; export DEFAULT_SHROBJ ... It appears that the make config process does not like the parentheses in the PLATFORM variable. PLATFORM := mingw32_nt-5.1-1.0.10(0.46-3-2)-i86 I fixed the problem by adjusting the relevant statement in the GNUmakefile to read: PLATFORM := mingw32_nt-5.1-1.0.10-0.46-3-2--i86 changing the "(" and ")" to "-". The above syntax error problem is fixed, but what about all the "no" messages, and the "--" message(s) I am seeing on the MSYS console? Are they normal or do they indicate an invalid build? * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #5 ** Further along in the build proces, with all the above-mentioned fixes in place, the build terminated with the following displayed on the MSYS console: generating dependencies for $(TOPDIR)/src/assert.cpp gcc -M -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/assert.cpp make[2]: Leaving directory `/stdcxx-4.2.1/build/lib' make[2]: Entering directory `/stdcxx-4.2.1/build/lib' gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/assert.cpp gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/atomic-cxx.S gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/bitset.cpp In file included from i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:195, from i:/apps/stdcxx-4.2.1/include/rw/_traits.h:40, from i:/apps/stdcxx-4.2.1/include/rw/_strref.h:48, from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t* wcschr(wchar_t*, wchar_t)': i:/apps/stdcxx-4.2.1/include/ansi/cwchar:613: error: declaration of C function `wchar_t* wcschr(wchar_t*, wchar_t)' conflicts with i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:204: error: previous declaration `wchar_t* wcschr(const wchar_t*, wchar_t)' here i:/apps/stdcxx-4.2.1/include/ansi/cwchar: At global scope: i:/apps/stdcxx-4.2.1/include/ansi/cwchar:725: error: expected nested-name-specifier before "wcscspn" i:/apps/stdcxx-4.2.1/include/ansi/cwchar:725: confused by earlier errors, bailing out make[2]: *** [bitset.o] Error 1 make[2]: Leaving directory `/stdcxx-4.2.1/build/lib' make[1]: *** [lib] Error 2 make[1]: Leaving directory `/stdcxx-4.2.1/build' make: *** [libstd] Error 2 SteveP@DELL /stdcxx-4.2.1 The error: i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:204: error: previous declaration `wchar_t* wcschr(const wchar_t*, wchar_t)' here is puzzling. Why is the stdcxx-4.2.1 build examining the MinGW /MinGW/include/ library? I temporarily worked around this problem by changing line 204 of the the MinGW wchar.h file to conform with the /stdcxx-4.2.1/include/ansi/cwchar declaration of the C function `wchar_t* wcschr(wchar_t*, wchar_t), and this eliminated the error message. The error: i:/apps/stdcxx-4.2.1/include/ansi/cwchar:725: error: expected nested-name-specifier before "wcscspn" seemed legitimate, as the "::" qualifier before the "wcscspn" was missing. So I added the "::" qualifier to the line 725 in the /stdcxx-4.2.1/include/ansi/cwchar file. * * * * * * ** GNUmakefile / MinGW+MSYS Incompatibility #6 ** With the above-mentioned fixes in place, the build failed further on, with a bunch of additional errors: generating dependencies for $(TOPDIR)/src/assert.cpp gcc -M -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/assert.cpp make[2]: Leaving directory `/stdcxx-4.2.1/build/lib' make[2]: Entering directory `/stdcxx-4.2.1/build/lib' gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/assert.cpp gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/atomic-cxx.S gcc -c -I/stdcxx-4.2.1/include/ansi -I/stdcxx-4.2.1/include -I/stdcxx-4.2.1/build/include -pedantic -nostdinc++ -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /stdcxx-4.2.1/src/bitset.cpp In file included from i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:195, from i:/apps/stdcxx-4.2.1/include/rw/_traits.h:40, from i:/apps/stdcxx-4.2.1/include/rw/_strref.h:48, from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t* wcsrchr(wchar_t*, wchar_t)': i:/apps/stdcxx-4.2.1/include/ansi/cwchar:944: error: declaration of C function `wchar_t* wcsrchr(wchar_t*, wchar_t)' conflicts with i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:217: error: previous declaration `wchar_t* wcsrchr(const wchar_t*, wchar_t)' here i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t* wcsrchr(wchar_t*, wchar_t)': i:/apps/stdcxx-4.2.1/include/ansi/cwchar:948: error: invalid conversion from `const wchar_t*' to `wchar_t*' i:/apps/stdcxx-4.2.1/include/ansi/cwchar: At global scope: i:/apps/stdcxx-4.2.1/include/ansi/cwchar:958: error: expected declaration before '}' token In file included from i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:195, from i:/apps/stdcxx-4.2.1/include/rw/_traits.h:40, from i:/apps/stdcxx-4.2.1/include/rw/_strref.h:48, from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/ansi/cwchar:919:1: unterminated #else i:/apps/stdcxx-4.2.1/include/ansi/cwchar:99:1: unterminated #if i:/apps/stdcxx-4.2.1/include/ansi/cwchar:87:1: unterminated #if i:/apps/stdcxx-4.2.1/include/ansi/cwchar:65:1: unterminated #ifndef i:/apps/stdcxx-4.2.1/include/ansi/cwchar:36:1: unterminated #else i:/apps/stdcxx-4.2.1/include/ansi/cwchar:32:1: unterminated #else In file included from i:/apps/stdcxx-4.2.1/include/rw/_traits.h:40, from i:/apps/stdcxx-4.2.1/include/rw/_strref.h:48, from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:131:1: unterminated #else i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:40:1: unterminated #elif i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:32:1: unterminated #ifndef In file included from i:/apps/stdcxx-4.2.1/include/rw/_strref.h:48, from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/rw/_traits.h:39:1: unterminated #ifndef i:/apps/stdcxx-4.2.1/include/rw/_traits.h:32:1: unterminated #ifndef In file included from i:/apps/stdcxx-4.2.1/include/string:43, from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/rw/_strref.h:47:1: unterminated #ifndef i:/apps/stdcxx-4.2.1/include/rw/_strref.h:32:1: unterminated #ifndef In file included from i:/apps/stdcxx-4.2.1/include/bitset:34, from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/string:30:1: unterminated #ifndef In file included from i:/apps/stdcxx-4.2.1/src/bitset.cpp:31: i:/apps/stdcxx-4.2.1/include/bitset:30:1: unterminated #ifndef make[2]: *** [bitset.o] Error 1 make[2]: Leaving directory `/stdcxx-4.2.1/build/lib' make[1]: *** [lib] Error 2 make[1]: Leaving directory `/stdcxx-4.2.1/build' make: *** [libstd] Error 2 SteveP@DELL /stdcxx-4.2.1 There's another conflict with file wchar.h in the MinGW /MinGW/include/ library: i:/apps/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/../include/wchar.h:217: error: previous declaration `wchar_t* wcsrchr(const wchar_t*, wchar_t)' here i:/apps/stdcxx-4.2.1/include/ansi/cwchar: In function `wchar_t* wcsrchr(wchar_t*, wchar_t)': Also, it looks like there's an extern "C" { missing before the declaration of function wcsrchr on line 951 of file cwchar: inline const wchar_t* wcsrchr (const wchar_t *__s, wchar_t __c) Finally, there are a whole bunch of macro errors, in several files like: ... i:/apps/stdcxx-4.2.1/include/ansi/cwchar:919:1: unterminated #else ... i:/apps/stdcxx-4.2.1/include/rw/_mbstate.h:131:1: unterminated #else ... i:/apps/stdcxx-4.2.1/include/rw/_traits.h:39:1: unterminated #ifndef ... i:/apps/stdcxx-4.2.1/include/rw/_strref.h:47:1: unterminated #ifndef ... i:/apps/stdcxx-4.2.1/include/string:30:1: unterminated #ifndef ... i:/apps/stdcxx-4.2.1/include/bitset:30:1: unterminated #ifndef * * * * * * At this point, I decided that I must be doing something VERY WRONG in running the build, so I backed out the changes I made to the two source files: /MinGW/include/wchar.h /stdcxx-4.2.1/include/ansi/cwchar and decided to post a message to stdcxx-user. Any suggestions would be most welcome. -- View this message in context: http://www.nabble.com/Building-stdcxx-4.2.1-Using-MinGW%2BMSYS-On-Windows-XP-%28SP2%29-tp20672758p20672758.html Sent from the stdcxx-user mailing list archive at Nabble.com.