header probs with cygwin gcc 3.0.4 and -mno-cygwin
Raoul Gough
RaoulGough@yahoo.co.uk
Wed May 22 12:35:00 GMT 2002
When configured for cygwin, the g++-v3 headers assume a lot of things about
math.h, wchar.h and wctype.h which are not right for mingw. This causes
problems on my system when I use the -mno-cygwin option, because the
compiler picks up incompatible headers (at least with the naive way I
configured the compiler). e.g:
/usr/local/include/g++-v3/bits/std_cwchar.h:54: conflicting types for
`typedef
struct mbstate_t mbstate_t'
/usr/local/include/mingw/wchar.h:264: previous declaration as `typedef int
mbstate_t'
this particular error occurs because mingw wchar.h declares mbstate_t, but
the c++config.h (having been configured for Cygwin) does not define
_GLIBCPP_HAVE_MBSTATE_T. As mentioned, there are also problems with math.h
(no float functions like sqrtf) and wctype.h. I've noticed (via -v) that the
compiler expects to find the following:
ignoring nonexistent directory "/usr/include/mingw/g++-3"
ignoring nonexistent directory "/usr/include/mingw/g++"
So can anybody help me out here? I've succeeded in hacking the mingw headers
to satisfy the cygwin-configured g++-v3, but it seems like there must be a
better way around this. In particular, is there a way to build the mingw g++
headers on a Cygwin system and install them in parallel to the normal ones?
Regards,
Raoul Gough.
P.S. g++ -v reports:
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/specs
Configured with:
/cygdrive/d/gcc/gcc-3.0.4/configure --enable-languages=c,c++
Thread model: single
gcc version 3.0.4
More information about the Libstdc++
mailing list