Skip to main content

4.2) Intel: Basic Compilation


The C compiler can be accessed through the command icc, and has the general form:

$ icc [options] file1 [file2 ...]

Where options represents zero or more compiler options, and fileN represents source, assembly, object or other linkable file. For example:

$ icc -o hello hello.c

will compile the source file hello.c and put the output in executable file hello. When the –o option is omitted, the default output filename is a.out.

To execute the program use:

$ ./hello

To compile C++ code you can use the same command, icc, or alternately icpc. For the full details look at man icc.