Reaching Others University at Buffalo - The State University of New York
Skip to Content

GNU

The entire GNU compiler suite is available, with the usual invocations, gcc, g++, and g77.

Category:  Compiler

 

Usage Notes:

The GNU compilers are in the default path.

Show the version using the command:  gcc -v

 

Example of compiling hello-world with the GNU C compiler:


[cdc@u2:~]$ cat hello-world.c 
#include <stdio.h>

int main() {
   printf("Hello world!\n");
}

[cdc@u2:~]$ gcc -o hello-gnu hello-world.c 
[cdc@u2:~]$ ./hello-gnu 
Hello world!
[cdc@u2:~]$