🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Stephen Meatheringham Tue, 06 Oct 1992 05:49
Installing g++ (2.2.2) and the g++-include directory
#434
Author: Stephen Meatheringham
Date: Tue, 06 Oct 1992 05:49
24 lines
1480 bytes
Hi All,
   I am trying to install gcc and g++ (2.2.2) on our Sun Sparcstations running
SunOS4.1.2.    Everything seems to go fine - no errors or crashing out during 
the making and installation.  But ... when we try to compile a C++ program I
get the following :
sjm@moggie> g++ -c sjm.c
sjm.c:2: iostream.h: No such file or directory

Further digging around in the man page suggests there should be a directory
such as /usr/local/lib/g++-includes which contains the include files.   I'm
afraid there's no such beastie to be found, all the other include files for
gcc look okay in /usr/local/lib/gcc-lib/...

We do have the Sun supplied C++ compiler and that works fine, when you specify
-I/lusr/lang/SC1.0.1/include.   Do we have to specify the same for g++?  If so
why the discussion about g++-include in the man page?

-- 

				Stephen Meatheringham
				Mt. Stromlo Observatory
				Private Bag, Weston Creek P.O.
				ACT 2611, AUSTRALIA
				email : sjm@moggie.anu.edu.au
Re: Installing g++ (2.2.2) and the g++-include directory
#403
Author: Stephen Meatheringham
Date: Wed, 07 Oct 1992 04:48
26 lines
1741 bytes
In article <1992Oct6.054902.1081@newshost.anu.edu.au>, sjm@merlin.anu.edu.au (Stephen Meatheringham) writes:

|>    I am trying to install gcc and g++ (2.2.2) on our Sun Sparcstations running
|> SunOS4.1.2.    Everything seems to go fine - no errors or crashing out during 
|> the making and installation.  But ... when we try to compile a C++ program I
|> get the following :
|> sjm@moggie> g++ -c sjm.c
|> sjm.c:2: iostream.h: No such file or directory
|> Further digging around in the man page suggests there should be a directory
|> such as /usr/local/lib/g++-includes which contains the include files.   I'm
|> afraid there's no such beastie to be found, all the other include files for
|> gcc look okay in /usr/local/lib/gcc-lib/...
|> 


Thanks to everyone who replied to the above from myself.   Yes.   I needed to
get libg++ and install that.   I now have a happy working g++.    But the
problem stemmed from the fact that I installed gcc 2.2.2 (which includes g++)
and no where in the documentation or installation instructions can I find a 
mention of needing to get libg++ to get it working.

				Stephen Meatheringham
				Mt. Stromlo Observatory
				Private Bag, Weston Creek P.O.
				ACT 2611, AUSTRALIA
				email : sjm@moggie.anu.edu.au
Re: Installing g++ (2.2.2) and the g++-include directory
#405
Author: Peter K. Campbell
Date: Thu, 08 Oct 1992 02:39
31 lines
1942 bytes
sjm@merlin.anu.edu.au (Stephen Meatheringham) writes:

>Hi All,
>   I am trying to install gcc and g++ (2.2.2) on our Sun Sparcstations running
>SunOS4.1.2.    Everything seems to go fine - no errors or crashing out during 
>the making and installation.  But ... when we try to compile a C++ program I
>get the following :
>sjm@moggie> g++ -c sjm.c
>sjm.c:2: iostream.h: No such file or directory

>Further digging around in the man page suggests there should be a directory
>such as /usr/local/lib/g++-includes which contains the include files.   I'm
>afraid there's no such beastie to be found, all the other include files for
>gcc look okay in /usr/local/lib/gcc-lib/...

>We do have the Sun supplied C++ compiler and that works fine, when you specify
>-I/lusr/lang/SC1.0.1/include.   Do we have to specify the same for g++?  If so
>why the discussion about g++-include in the man page?

This puzzled me for a while too.  The trouble is that, despite the fact that
gcc is a C++ as well as a c compiler, it only comes with c libraries.  If
you want to use the C++ capabilities you need to obtain and compile the
g++ libraries.  The latest version is libg++-2.2.tar.Z  which can be
obtained from "all good ftp sites" (well, the GNU ones at least :-),
e.g. archie.au (plaza.aarnet.edu.au) in the /gnu directory.

This is unfortunately not made clear anywhere in the manual (at least, not
anywhere that I found).

Peter K. Campbell
p.campbell@trl.oz.au
Re: Installing g++ (2.2.2) and the g++-include directory
#406
Author: david d 'zoo' zuhn
Date: Thu, 08 Oct 1992 05:35
17 lines
1412 bytes
   This puzzled me for a while too.  The trouble is that, despite the fact that
   gcc is a C++ as well as a c compiler, it only comes with c libraries.  

This isn't true.  GCC comes with neither a C library nor a C++ library.
Your system probably has a C library however, and that's what GCC is using.
GCC installs some header files which are compiler specific, such as the
<stdarg.h> and the <limits.h> files.  

There are GNU C and C++ libraries available for those who don't wish to use
the native system libraries.  The biggest difference is that most systems
don't come standard with any sort of C++ library.


  david d 'zoo' zuhn |    The problem with politics is that it puts you in
    cygnus support   |    contact with the sort of people that you'd really
    zoo@cygnus.com   |    rather try to avoid.  
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads