On Linux* and Mac OS* X operating systems, you need to set some environment variables to specify locations for the varioius components prior to using the command line. The Intel C++ Compiler installation includes a shell script that you can run to set environment variables. For more information, see Using the compilervars File to Specify Location of Components.
On Windows* operating systems, you typically do not need to set any environment variables prior to using the command line. Each of the Intel® C++ variations has its own Intel Compiler command-line window, available from the Intel® Parallel Studio XE program folder. This window has the appropriate environment variables already set for the command-line environment.
You can invoke the Intel C++ Compiler on the command line with the corresponding command.
Linux OS* and Mac OS* X:
The command is either icc or icpc.
When you invoke the compiler with icc, the compiler builds C source files using C libraries and C include files. If you use icc with a C++ source file, it is compiled as a C++ file. Use icc to link C object files.
When you invoke the compiler with icpc the compiler builds C++ source files using C++ libraries and C++ include files. If you use icpc with a C source file, it is compiled as a C++ file. Use icpc to link C++ object files.
The icc or icpc command does the following:
Compiles and links the input source file(s).
Produces one executable file, a.out, in the current directory.
Windows* OS:
The command is icl.
The icl command does the following:
Compiles and links the input source file(s).
Produces object file(s)and assigns the names of the respective source file(s), but with a .obj extension
Produces one executable file and assigns to it the name of the first input file on the command line, but with a .exe extension.
Places all the files in the current directory.
When you invoke the Intel C++ Compiler, the syntax is:
Linux* OS/Mac OS* X
{icc|icpc} [options] file1 [file2 . . .]
Windows* OS
icl [options] file1 [file2 . . .][/link link_options]
Argument |
Description |
---|---|
options |
Indicates one or more command-line options. The compiler recognizes one or more letters preceded by a hyphen (-). On Windows* OS, options are preceded by a slash (/).This includes linker options. Options are not required when invoking the compiler. The default behavior of the compiler implies that some options are ON by default when you invoke compiler. |
file1, file2 . . . |
Indicates one or more files to be processed by the compiler. You can specify more than one file. Use a space as a delimiter for multiple files. |
/link (Windows* OS) |
All options following /link are passed to the linker. Therefore, all other compiler options must precede /link |
Copyright © 1996-2011, Intel Corporation. All rights reserved.