Compiling on your Sun Workstation

Here at CCPO we offer the following compilers:

Sun Fortran

The Sun fortran compiler is based on the 1977 Fortran standard. In order to use the Sun Fortran compiler you must have /usr/local/lang in your path. If you are using the default configuration files, this should not be a problem. The fortran compiler can be accessed by using the f77 command. Use man f77 for information on the fortran compiler's options.

Sun C Compiler

The Sun C Compiler is based on the Kernighan & Ritchie (K&R) specification for C. It does not understand most ANSI conventions and it should not be used. The GNU ANSI C Compiler is a much more robust and portable compiler. In order to use the Sun C compiler you must have /usr/bin in your path. If you are using the default configuration files, this should not be a problem. The Sun C Compiler can be accessed by using the cc command. Use man cc for information on the Sun C compiler's options.

GNU ANSI C Compiler

The GNU ANSI C Compiler is based on the ANSI Standard C specification. It is the most robust and portable of the two C compilers offerred. Its use is highly recommended. In order to use the GNU ANSI C compiler you must have /usr/local/bin in your path. If you are using the default configuration files, this should not be a problem. The GNU ANSI C Compiler can be accessed by using the gcc command. Use man gcc for information on the GNU ANSI C compiler's options.

GNU C++ Compiler

The GNU ANSI C Compiler is based roughly on the AT&T 3.0 specification of C++. In order to use the GNU C++ compiler you must have /usr/local/bin in your path. If you are using the default configuration files, this should not be a problem. The GNU C++ Compiler can be accessed by using the c++ or g++ command. Use man g++ for information on the GNU C++ compiler's options.

Include Files

On all of the above compilers you can use the -Iinclude_file_directory option to specify additional directories to search for include files. The following include directories might be of interest:

Libraries Files

On all of the above compilers you can use the -Linclude_file_directory option to specify additional directories to search for library files. In order to specify the specific library you can either put the entire library name and path on the command line or you can use the -llibrary_name (like -L/usr/local/imsl/ib/lib.sun4 -limsl) The following libraries might be of interest:
Press here to return to the Compiling Menu