public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc-3.1.1 & SunOS 5.8
@ 2002-08-19  8:21 Rui Pacheco
  2002-08-20  6:53 ` Claudio Bley
  0 siblings, 1 reply; 2+ messages in thread
From: Rui Pacheco @ 2002-08-19  8:21 UTC (permalink / raw)
  To: gcc-help

I recently downloaded the tar.gz for gcc-3.1.1 and tried to compile it on a 
SunOS 5.8.

	/usr/compiler/ $ gunzip *gz
	/usr/compiler $ tar *tar
	/usr/compiler/gcc-3.1.1 $ mkdir objdir
	/usr/compiler/gcc-3.1.1/objdir $ ../configure --enable-threads=posix 
--enable-languages=c,c++ --disable-nls --with-ld=/usr/ccs/bin/ld 
--disable-libobjc --disable-libf2c --disable-libjava
	/usr/compiler/gcc-3.1.1/objdir $ make bootstrap-lean
	/usr/compiler/gcc-3.1.1/objdir $ make install


Things go without any problems, but whenever I try to compile any C++ 
programs, gcc doesn't seem to see the include files. So, if I try:

	c++ -g class.cc -o class

I get these error messages:

	"ficheiro.h:5: 'string' is used as a type, but is not defined as a type."
	...

This repeats for about any include I decide to use.
Does anyone have the cure for this? I've been battling this for 3 days and 
haven't gone too far... :|


BTW, my uname -a is "SunOS brisadbs 5.8 Generic_108528-14 sun4u sparc 
SUNW,Ultra-1"


Thank you
Rui Pacheco

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gcc-3.1.1 & SunOS 5.8
  2002-08-19  8:21 Gcc-3.1.1 & SunOS 5.8 Rui Pacheco
@ 2002-08-20  6:53 ` Claudio Bley
  0 siblings, 0 replies; 2+ messages in thread
From: Claudio Bley @ 2002-08-20  6:53 UTC (permalink / raw)
  To: gcc-help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Rui" == Rui Pacheco <ruipacheco@hotmail.com> writes:

    Rui> Things go without any problems, but whenever I try to compile
    Rui> any C++ programs, gcc doesn't seem to see the include
    Rui> files. So, if I try:

    Rui> 	c++ -g class.cc -o class

    Rui> I get these error messages:

    Rui> 	"ficheiro.h:5: 'string' is used as a type, but is not
    Rui> defined as a type."  ...

If gcc wouldn't see the include files it would say so. Your code seems
to be not C++/STL standard conformant.

All types defined as part of the C++ STL are declared in namespace
std. You need to use std::string for example - or say "using namespace
std;" resp. "using std::string;" in your code.

HTH
- -- 
Claudio Bley                                                        _ 
                                             ASCII ribbon campaign ( )
ICQ# 83197241                                 - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>

iD8DBQE9YkmMTpSishmp0ioRAmZnAKCX3VDIB1tQuKD76CSXTDKsHiTQxQCePB57
PofctVeKB5vL7eOzgy552NU=
=565/
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-20 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19  8:21 Gcc-3.1.1 & SunOS 5.8 Rui Pacheco
2002-08-20  6:53 ` Claudio Bley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).