*BSD News Article 61462


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!metro!metro!inferno.mpx.com.au!news.mel.aone.net.au!usenet
From: tim@cst.com.AU (Tim Liddelow)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Errors when using <string> from g++ ?
Date: 7 Feb 1996 04:33:06 GMT
Organization: Labtam Australia Pty. Ltd., Melbourne Australia
Lines: 59
Distribution: world
Message-ID: <4f9a22$f01@news.mel.aone.net.au>
Reply-To: tim@cst.com.AU
NNTP-Posting-Host: titanic.labtam.oz.au


I've been having a few problems compiling some C++ code which uses the
g++ <string> header file (from g++ 2.7.2).  Basically what happens is
that at some stage, <ctype.h> is included, and wchar_t isn't defined and
this is required by <runetype.h> .  However, if I include <ctype.h> myself
before I include <string>, the problem goes away.  This is, however, not a
good thing!  Below is compiler output - any help would be appreciated.


g++ -I. -I../import/include -D_POSIX_SOURCE -fpic -frepo -Wall   -g  -c RemoteClientAddress.cc 
In file included from /usr/include/ctype.h:51,
                 from /usr/local/lib/g++-include/std/cctype.h:6,
                 from /usr/local/lib/g++-include/std/straits.h:105,
                 from /usr/local/lib/g++-include/std/bastring.h:36,
                 from /usr/local/lib/g++-include/std/string.h:6,
                 from /usr/local/lib/g++-include/string:5,
                 from RemoteClientAddress.h:34,
                 from RemoteClientAddress.cc:31:
/usr/include/runetype.h:58: syntax error before `;'
/usr/include/runetype.h:59: syntax error before `;'
/usr/include/runetype.h:60: syntax error before `;'
/usr/include/runetype.h:73: `sgetrune' was not declared in this scope
/usr/include/runetype.h:74: warning: ANSI C++ forbids declaration `rune_t' with no type or storage class
/usr/include/runetype.h:76: parse error before `*'
/usr/include/runetype.h:77: syntax error before `;'
/usr/include/runetype.h:80: syntax error before `['
/usr/include/runetype.h:81: syntax error before `['
/usr/include/ctype.h: In function `int __toupper(int)':
In file included from /usr/local/lib/g++-include/std/cctype.h:6,
                 from /usr/local/lib/g++-include/std/straits.h:105,
                 from /usr/local/lib/g++-include/std/bastring.h:36,
                 from /usr/local/lib/g++-include/std/string.h:6,
                 from /usr/local/lib/g++-include/string:5,
                 from RemoteClientAddress.h:34,
                 from RemoteClientAddress.cc:31:
/usr/include/ctype.h:165: `struct _RuneLocale' has no member named `mapupper'
/usr/include/ctype.h:166: warning: control reaches end of non-void function `__toupper(int)'
/usr/include/ctype.h: In function `int __tolower(int)':
/usr/include/ctype.h:174: `struct _RuneLocale' has no member named `maplower'
/usr/include/ctype.h:175: warning: control reaches end of non-void function `__tolower(int)'
/usr/include/string.h: At top level:
In file included from /usr/local/lib/g++-include/std/cstring.h:18,
                 from /usr/local/lib/g++-include/std/straits.h:106,
                 from /usr/local/lib/g++-include/std/bastring.h:36,
                 from /usr/local/lib/g++-include/std/string.h:6,
                 from /usr/local/lib/g++-include/string:5,
                 from RemoteClientAddress.h:34,
                 from RemoteClientAddress.cc:31:
/usr/include/string.h:41: warning: abstract declarator used as declaration
gmake: *** [RemoteClientAddress.o] Error 1

Compilation exited abnormally with code 2 at Wed Feb  7 15:27:00

Cheers
Tim.