User and Reference Guide for the Intel® C++ Compiler 14.0
You typically do not need to set any environment variables prior to using the command line. Each of the Visual Studio* IDE variations has its own Intel® Compiler command-line window, available from the Intel® Parallel Studio XE 2013 program folder. For more information, see Using the Intel® Command-Line Window.
If you would like to use a custom shell instead, the Intel® C++ Compiler installation includes a batch script that you can run to set environment variables. For more information, see Using the compilervars File to Specify Location of Components.
You need to set some environment variables to specify locations for the various components prior to using the command line. The Intel® C++ Compiler installation includes a batch file for setting environment variables that can run in the terminal window. For more information, see Using the compilervars File to Specify Location of Components.
Linux OS* and OS X*:
You can invoke the Intel® C++ Compiler on the command line using 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:
You can invoke the Intel® C++ Compiler on the command line using the icl command. This command:
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.
Because the driver calls other software components, error messages may be returned by these other components. 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* OS and 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. On Linux* OS and OS X* systems, 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 invoking compiler. NoteOn Linux* OS systems, the 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 -no-offload compiler option. For more information, see the Programming for Intel® MIC Architecture: Heterogeneous Programming section and the -no-offload 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* OS) |
All options following /link are passed to the linker. Compiler options must precede link if they are not to be passed to the linker. |
Using makefiles from the Command Line: Use makefiles to specify a number of files with various paths and to save this information for multiple compilations. For more information on using makefiles, see Using Makefiles to Compile Your Application.
Using a batch file from the Command Line: Use a .bat file to consistently execute the compiler with a desired set of options instead of retyping the command each time you need to recompile.