3.4.15.1.1 egcs
egcs 1.0.3 is now the default compiler invoked by
/s/std/bin/gcc.
egcs is a project derived from the GNU GCC 2.8 sources.
Detailed information about egcs can be found on the
egcs project home page.
The executables for the current default version of egcs (1.0.3) can be found under /s/gcc/bin/.
The latest version of egcs (1.1) is also available under
/s/egcs-1.1
A few things to note:
- The c++ implementation is substantially different than the one
included with GNU g++.
In particular, the template code has been completely rewritten.
If you have problems adapting your code, you may have to keep using
the old g++ (/s/ogcc/bin/g++).
- The X86 builds of the compiler include optimizer patches from the
Pentium Compiler Group.
- The use of libg++ is not supported with this compiler. Code that
uses libg++ should be updated to compile with the standard c++ library.
If this is not practical, the code will have to becompiled with an
older version of GNU g++ (/s/ogcc/bin/g++).
- The fortran compiler (g77) is now included.
- Shared versions of the c++ libraries have been built, and installed under
the /s/gcc/lib/shared directory. By default, programs
will be statically linked. To use the shared versions, add
-L/s/gcc/lib/shared to your compile command line.
If you link with the shared libraries, you might also want to use
the -R/s/gcc/lib/shared option (Solaris), or the
-rpath /s/gcc/lib/shared option (Digital Unix) so
that the libraries can be located at runtime. An alternative is to
set the LD_LIBRARY_PATH environment variable
at runtime.
See Also:
[ Back to Top ]
3.4.15.1.2 GCC (GNU C/C++ Compiler)
GCC is no longer our default C/C++ compiler, but the last
recommended version of GCC can still be found under /s/ogcc
If you want to keep using GCC as your default compiler, insert
/s/ogcc/bin in your path before /s/std/bin.
The recommended version of GCC available under /s/ogcc
is GCC 2.7.2. Some newer versions of GCC
(2.8.x) may appear under /s,
but at this time they are not stable enough for us to recommend their use.
Notes on GCC:
- GCC implements ANSI C
- use gdb to debug executables compiled with the
-g flag (not available on alphas)
- gcc -Wall is strongly recommended
Notes on G++:
- /s/ogcc/bin/g++
- g++ invokes the compiler with commonly used options
(including libg++)
- use gcc with appropriate flags and libraries for mixed
language compilation and more control over linking.
- use gdb to debug executables compiled with the
-g flag (not available on alphas)
- libg++ provides a set of object libraries and
interfaces to the Unix C library
See Also:
[ Back to Top ]
3.4.15.1.3 Sun WorkShop C/C++ Compilers (Solaris)
The SUN Workshop compilers have been installed in
/opt/SUNWspro/bin on Solaris Sparc and x86 computers.
Sun Workshop C/C++ Compiler notes:
- Use dbx (/opt/SUNWspro/bin/dbx)
to debug executables
compiled with the -gflag
- note: This compiler is a Sun optional product. Not all Sun
sites will have it installed
See Also:
- insert link to SUN Workshop documentation here
[ Back to Top ]
3.4.15.1.4 Digital Unix C Compilers
There are two compilers available on Digital Unix (DEC Alpha computers):
- cc is not ANSI C
- c89 is ANSI C
You can use dbx to debug programs compiled with the
-g flag to either compiiler.
[ Back to Top ]