Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Oct 2002 17:07:00 -0700
From:      walt <wa1ter@hotmail.com>
To:        freebsd-current@freebsd.org
Subject:   Re: stdlib.h:57: redeclaration of C++ built-in type `wchar_t'
Message-ID:  <3DA0D024.4030505@hotmail.com>
References:  <anqemm$168n$1@FreeBSD.csie.NCTU.edu.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
Hanspeter Roth wrote:
> Hello,
> 
> when running buildworld I get:
> 
> ===> gnu/usr.bin/gperf/doc
> c++  -O -pipe    -D__FBSDID=__RCSID -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/bool-array.cc
> c++  -O -pipe    -D__FBSDID=__RCSID -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/gen-perf.cc
> In file included from /usr/src/contrib/gperf/src/gen-perf.cc:23:
> /usr/include/stdlib.h:57: redeclaration of C++ built-in type `wchar_t'
> *** Error code 1
> 
> 
> #ifdef  _BSD_SIZE_T_
> typedef _BSD_SIZE_T_    size_t;
> #undef  _BSD_SIZE_T_
> 
> How can I resolve this redeclaration?

I'm no expert, but I'd guess you have some stale header files in /usr/include.

You could try this:

cd /usr
mv include include.old
cd /usr/src
make includes
make buildworld

There may be things in the include.old directory you would want to move back
to /usr/include [1], so I would look through it before deleting the whole thing.

If you want to be more conservative you could just start by moving
/usr/include/g++ out of the way instead of the whole /usr/include, but
that may or may not be sufficient.



[1]  I'm not sure this applies to FreeBSD, since the ports are supposed to
put their header files in /usr/local/include, but I don't want to give you
risky advice when I'm not certain.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DA0D024.4030505>