You may need to set certain environment variables before using the command line. For more information, see Specifying the Location of Compiler Components with compilervars.
macOS*: Alternatively, you can invoke the compiler with the commands described below using symbolic links in /usr/local/bin.
You can invoke the compiler using the icc or icpc command.
For more information on using Microsoft Visual Studio*, see Using Microsoft Visual Studio. For information on using Xcode*, see Using Xcode.For information on using Eclipse*, see Using Eclipse.
Linux*:
Invoke the compiler using icc/icpc to compile C/C++ source files.
The icc/icpc command does the following:
macOS*:
Invoke the compiler using icc/icpc to compile C/C++ source files.
The icc/icpc command does the following:
Windows*:
You can invoke the Intel® C++ Compiler on the command line using the icl command. This command:
When compilation occurs with the Intel® Compiler, many tools may be called to complete the task which may reproduce diagnostics unique to the given tool.For instance, the linker may return a message if it cannot resolve a global reference. The watch option can help clarify which component is generating the error.
When you invoke the Intel® C++ Compiler, the syntax is:
// (Linux) {icc|icpc} [options] file1 [file2...]
// (macOS*) {icc|icpc} [options] file1 [file2...]
// (Windows) icl [options] file1 [file2...][/link link_options]
Argument |
Description |
---|---|
options |
Indicates one or more command line options. On Linux and macOS* systems, the compiler recognizes one or more letters preceded by a hyphen (-). On Windows, 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 invoking compiler. NoteThe compiler recognizes Language Extensions for Offloading in the source program by default and builds a heterogeneous binary that runs on both the target and host when any are present. If your program includes these language extensions and you do not want to build a heterogeneous binary, specify the negative form of the -qoffload (Linux) or /Qoffload (Windows) compiler option. For more information, see the qoffload, Qoffload compiler option. |
file1, file2... |
Indicates one or more files to be processed by the compiler. You can specify more than one file, using space as a delimiter for multiple files. |
/link (Windows) |
All options following /link are passed to the linker. Compiler options must precede link if they are not to be passed to the linker. |