Skip to main content

gcc

Link to section 'Description' of 'gcc' Description

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, and Go, as well as libraries for these languages.

Link to section 'Versions' of 'gcc' Versions

  • Bell: 4.8.5, 6.3.0, 9.3.0, 10.2.0
  • Brown: 4.8.5, 5.2.0, 6.3.0, 7.3.0, 8.3.0
  • Scholar: 4.8.5, 5.2.0, 6.3.0, 7.3.0, 8.3.0
  • Gilbreth: 4.8.5, 6.3.0, 9.3.0
  • Negishi: 8.5.0, 11.2.0, 12.2.0
  • Anvil: 8.4.1, 11.2.0, 11.2.0-openacc
  • Workbench: 4.8.5, 5.2.0, 6.3.0, 7.3.0, 8.3.0

Link to section 'Module' of 'gcc' Module

You can load the modules by:

module load gcc

Link to section 'Compiling Serial Programs' of 'gcc' Compiling Serial Programs

A serial program is a single process which executes as a sequential stream of instructions on one processor core. Compilers capable of serial programming are available for C, C++, and versions of Fortran.

Here are a few sample serial programs:

  • serial_hello.f
  • serial_hello.f90
  • serial_hello.f95
  • serial_hello.c
  • serial_hello.cpp

    The following table illustrates how to compile your serial program:
    Language GCC
    Fortran 77
    $ gfortran myprogram.f -o myprogram
     
    Fortran 90
    $ gfortran myprogram.f90 -o myprogram
     
    Fortran 95
    $ gfortran myprogram.f95 -o myprogram
     
    C
    $ gcc myprogram.c -o myprogram
    C++
    $ g++ myprogram.cpp -o myprogram
Helpful?

Thanks for letting us know.

Please don't include any personal information in your comment. Maximum character limit is 250.
Characters left: 250
Thanks for your feedback.