Subject: gcc and libg++27

From: Dale Scheetz <[email-masked]>
Date: Sun, 30 Jun 1996 14:57:52 -0400 (EDT)

I have been trying to use gcc to compile some C++ code. Libg++27 seems to
be the supplier of standard headers for C++. I have both gcc-2.7.2-8 and
libg++27-2.7.1-2 installed. When I try to compile something, I get:

g++ -c -I./source/include -I/usr/include/g++/std ./source/parody2/tnode.cc
In file included from /usr/include/string.h:33,
                 from /usr/include/g++/std/cstring.h:18,
                 from source/include/parody.h:8,
                 from ./source/parody2/tnode.cc:7:
/usr/include/g++/std/stddef.h:15: parse error before `='
/usr/include/g++/std/stddef.h:15: warning: ANSI C++ forbids declaration `NPOS' with no type or storage class
/usr/include/g++/std/stddef.h:15: warning: implicit declaration of function `int size_t(...)'

It goes on like this, complaining about syntax in many of the standard
headers...

/usr/lib/g++-include/std/bastring.h:67: `__bsrep<char,string_char_traits<char> >::operator [](...)' must take exactly one argument
/usr/lib/g++-include/std/bastring.h:67: confused by earlier errors, bailing out
make: *** [tnode.o] Error 1

untill it finally errors out.

This is my first attempt at C++ on Linux, (I have worked in Borland up
til now) so pardon my ignorance. Do I need to do any pre-processing here?
Or have I just left out a necessary switch for gcc?

Any help would be appreciated.

TIA,

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  [email-masked]

------------ If you don't see what you want, just ask --------------

---

From: Rob Browning <[email-masked]>
Date: 30 Jun 1996 15:48:42 -0500

Dale Scheetz <[email-masked]> writes:

Are you using STL?  If so, I was completely unable to compile certain
bits of STL code until I modified the bottom of
/usr/include/g++/std/bastring.h like this:

#if !defined (_G_NO_EXTERN_TEMPLATES)
//#include <std/sinst.h> breaks stl (RLB) -- ambiguous instantiations
// same as complext.h including cinst.h
#endif

and complext.h like this:

//#include <std/cinst.h> breaks stl (RLB) -- ambiguous instantiations.
// same problem as bastring.h including sinst.h

Don't know if this is your problem, but I thought it might help.
Hopefully libg++ will get this straightened out upstream soon.

--
Rob