Go to the first, previous, next, last section, table of contents.


Obtaining Source Code

What is the latest version of gcc, g++, and libg++?

The latest "2.x" version of gcc/g++ is 2.7.0, released June 16, 1995. The latest version of libg++ is 2.7.0a, released June 19, 1995 (2.7.0 had an error in a makefile and was almost immediately replaced). . Don't use 2.5.x, with x less than 5, for C++ code; there were some serious bugs that didn't have easy workarounds. 2.5.8 is the most solid 2.5.x release. 2.6.3 is the most solid 2.6.x release.

For some non-Unix platforms, the latest port of gcc may be an earlier version (2.5.8, say). You'll need to use a version of libg++ that has the same first two digits as the compiler version, e.g. use libg++ 2.5.x (for the latest x you can find) with gcc version 2.5.8.

The latest "1.x" version of gcc is 1.42, and the latest "1.x" version of g++ is 1.42.0. While gcc 1.42 is quite usable for C programs, I recommend against using g++ 1.x except in special circumstances (and I can't think of any such circumstances).

How do I get a copy of g++ for Unix?

First, you may already have it if you have gcc for your platform; g++ and gcc are combined now (as of gcc version 2.0).

You can get g++ from a friend who has a copy, by anonymous FTP or UUCP, or by ordering a tape or CD-ROM from the Free Software Foundation.

The Free Software Foundation is a nonprofit organization that distributes software and manuals to raise funds for more GNU development. Getting your copy from the FSF contributes directly to paying staff to develop GNU software. CD-ROMs cost $400 if an organization is buying, or $100 if an individual is buying. Tapes cost around $200 depending on media type. I recommend asking for version 2, not version 1, of g++.

For more information about ordering from the FSF, contact gnu@prep.ai.mit.edu, phone (617) 542-5942 or anonymous ftp file `ftp://prep.ai.mit.edu/pub/gnu/GNUinfo/ORDERS' (you can also use one of the sites listed below if you can't get into "prep").

Here is a list of anonymous FTP archive sites for GNU software. If no directory is given, look in `/pub/gnu'.

ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep,
cair.kaist.ac.kr, ftp.nectec.or.th:/pub/mirrors/gnu

AUSTRALIA: archie.oz.au:/gnu (archie.oz or archie.oz.au for ACSnet)

AFRICA: ftp.sun.ac.za

MIDDLE-EAST: ftp.technion.ac.il:/pub/unsupported/gnu

EUROPE: irisa.irisa.fr, ftp.univ-lyon1.fr:, ftp.mcc.ac.uk,
unix.hensa.ac.uk:/pub/uunet/systems/gnu, ftp.denet.dk,
src.doc.ic.ac.uk:/gnu, ftp.eunet.ch, nic.switch.ch:/mirror/gnu,
ftp.informatik.rwth-aachen.de, ftp.informatik.tu-muenchen.de,
ftp.win.tue.nl, ftp.funet.fi, ftp.stacken.kth.se, isy.liu.se,
ftp.luth.se:/pub/unix/gnu, ftp.sunet.se, archive.eu.net

SOUTH AMERICA: ftp.unicamp.br, ftp.inf.utfsm.cl

WESTERN CANADA: ftp.cs.ubc.ca:/mirror2/gnu

USA: wuarchive.wustl.edu:/systems/gnu, labrea.stanford.edu,
ftp.digex.net, ftp.kpc.com:/pub/mirror/gnu,
f.ms.uky.edu:/pub3/gnu, jaguar.utah.edu:/gnustuff,
ftp.hawaii.edu:/mirrors/gnu, vixen.cso.uiuc.edu:/gnu,
mrcnext.cso.uiuc.edu, ftp.cs.columbia.edu:/archives/gnu/prep,
col.hp.com:/mirrors/gnu, gatekeeper.dec.com:/pub/GNU,
ftp.uu.net:/systems/gnu

The "official site" is prep.ai.mit.edu, but your transfer will probably go faster if you use one of the above machines.

Most GNU utilities are compressed with "gzip", the GNU compression utility. All GNU archive sites should have a copy of this program, which you will need to uncompress the distributions.

UUNET customers can get GNU sources from UUNET via UUCP. UUCP-only sites can get GNU sources by "anonymous UUCP" from site "osu-cis" at Ohio State University. You pay for the long-distance call to OSU; the price isn't too bad on weekends at 9600 bps. Send mail to uucp@cis.ohio-state.edu or osu-cis!uucp for more information.

OSU lines are often busy. If you're in the USA, and are willing to spend more money, you can get sources via UUCP from UUNET using their 900 number: 1-900-GOT-SRCS (900 numbers don't work internationally). You will be billed $0.50/minute by your phone company.

Don't forget to retrieve libg++ as well!

Getting gcc/g++ for the HP Precision Architecture

If you use the HP Precision Architecture (HP-9000/7xx and HP-9000/8xx) and you want to use debugging, you'll need to use the GNU assembler, GAS (version 2.3 or later). If you build from source, you must tell the configure program that you are using GAS or you won't get debugging support. A non-standard debug format is used, since until recently HP considered their debug format a trade secret. Thanks to the work of lots of good folks both inside and outside HP, the company has seen the error of its ways and has now released the required information. The team at the University of Utah that did the gcc port now has code that understands the native HP format.

Some enhancements for the HP that haven't been integrated back into the official GCC are available from the University of Utah, site jaguar.cs.utah.edu. You can retrieve sources and prebuilt binaries for GCC, GDB, binutils,and libg++; see the directory `/dist'.

The libg++ version is actually the same as the FSF 2.6. The Utah version of GDB can now understand both the GCC and HP C compiler debug formats, so it is no longer necessary to have two different GDB versions.

I recommend that HP users use the Utah versions of the tools (see above), though at this point the standard FSF versions will work well.

HP GNU users can also find useful stuff on the site geod.emr.ca in the `/pub/UNIX/GNU-HP' directory.

Jeff Law is leaving the University of Utah, so the Utah prebuilt binaries may be discontinued.

Getting gcc/g++ binaries for Solaris 2.x

"Sun took the C compiler out of Solaris 2.x. Am I stuck?"

No; prep.ai.mit.edu and its mirror sites provide GCC binaries for Solaris. As a rule, these binaries are not updated as often as the sources are, so if you want the very latest version of gcc/g++, you may need to grab and install binaries for an older version and use it to bootstrap the latest version from source.

The latest gcc binaries on prep.ai.mit.edu and its mirror sites are for version 2.5.6 for Solaris on the Sparc, and version 2.4.5 for Solaris on Intel 386/486 machines. There are also binaries for "gzip", the GNU compression utility, which you'll need for uncompressing the binary distribution. On any GNU archive site, look in subdirectories `i486-sun-solaris2' or `sparc-sun-solaris2'.

The ftp directory /pub/GNU on site ftp.quintus.com contains various GNU and freeware programs for Solaris2.X running on the sparc. These are packaged to enable installation using the Solaris "pkgadd" utility. These include GNU emacs 19.27, gcc (and g++) 2.6.0, Perl 4.036, and others.

How do I get a copy of g++ for (some other platform)?

The standard gcc/g++ distribution includes VMS support. Since the FSF people don't use VMS, it's likely to be somewhat less solid than the Unix version. Precompiled copies of g++ and libg++ in VMS-installable form are available by FTP from mango.rsmas.miami.edu. See also the site ftp.stacken.kth.se (in Sweden), directory /pub/GNU-VMS/contrib, which has gcc-2.5.8 and libg++-2.5.3.

There are two different versions of gcc/g++ for MS-DOS: EMX and DJGPP. EMX also works for OS/2 and is described later. DJGPP is DJ Delorie's port. It can be found on many FTP archive sites; its "home" is on oak.oakland.edu, directory `~ftp/pub/msdos/djgpp'.

The latest version of DJGPP is 1.12.maint1. This version runs under Windows 3.x. It includes a port of gcc 2.6.0, plus support software.

FSF sells floppies with DJGPP on them; see above for ordering software from the FSF.

A new Usenet group, comp.os.msdos.djgpp, has recently been created.

For information on Amiga ports of gcc/g++, retrieve the file `/pub/gnu/MicrosPorts/Amiga' from prep.ai.mit.edu, or write to Markus M. Wild <wild@nessie.cs.id.ethz.ch>, who I hope won't be too upset that I mentioned his name here.

A port of gcc to the Atari ST can be found on the site "atari.archive.umich.edu", under `/atari/Gnustuff/Tos', along with many other GNU programs. This version is usually the same as the latest FSF release. See the "Software FAQ" for the Usenet group "comp.sys.atari.st" for more information.

There are two different ports of gcc to OS/2, the so-called EMX port (which also runs on MS-DOS), and a port called "gcc/2". The latter port is no longer supported, since the EMX port includes all of its functionality. The EMX port's C library attempts to provide a Unix-like environment. For more information ask around on "comp.os.os2.programmer.misc".

The EMX port is available by FTP from

ftp.uni-stuttgart.de(129.69.1.12) in /pub/systems/os2/emx-0.9a
src.doc.ic.ac.uk(146.169.2.1) in /pub/packages/os2/unix/emx09a
ftp.informatik.tu-muenchen.de(131.159.0.198) in
        /pub/comp/os/os2/devtools/emx+gcc

Eberhard Mattes did the EMX port. His address is mattes@azu.informatik.uni-stuttgart.de.

I'm looking for more information on gcc/g++ support on the Apple Macintosh. Until recently, this FAQ did not provide such information, but FSF is no longer boycotting Apple as the League for Programming Freedom boycott has been dropped.

Mike White (cons116@twain.oit.umass.edu) says: "Versions 1.37.1 and 2.3.3 of gcc were ported by Stan Shebs and are available at ftp.cygnus.com under /pub/shebs. They are both interfaced to MPW. Shebs is apparently working on a cross compiler of 2.6.3 to create Mac apps from Unix boxes."

I don't know anything about more recent versions.

But I can only find g++-1.42!

"I keep hearing people talking about g++ 2.5.8 (or some other number starting with 2), but the latest version I can find is g++ 1.42. Where is it?"

As of gcc 2.0, C, C++, and Objective-C as well are all combined into a single distribution called gcc. If you get gcc you already have g++. The standard installation procedure for any gcc version 2 compiler will install the C++ compiler as well.

One could argue that we shouldn't even refer to "g++-2.x.y" but it's a convention. It means "the C++ compiler included with gcc-2.x.y."


Go to the first, previous, next, last section, table of contents.