Using the Command-line Link Tool

Use the command-line Link tool provided by Intel MKL to simplify building your application with Intel MKL.

The tool not only provides the options, libraries, and environment variables to use, but also performs compilation and building of your application.

The tool mkl_link_tool is installed in the <mkl directory>/tools directory, and supports the modes described in the following table.

Intel MKL Command-line Link Tool Modes
Mode Description Usage Example


The tool returns the compiler options, libraries, or environment variables necessary to build and execute the application.

Get Intel MKL libraries

mkl_link_tool -libs [Intel MKL Link Tool options]

Get compilation options

mkl_link_tool -opts [Intel MKL Link Tool options]

Get environment variables for application executable

mkl_link_tool -env [Intel MKL Link Tool options]


The Intel MKL Link Tool builds the application.

mkl_link_tool [options] <compiler> [options2] file1 [file2 ...]


  • options represents any number of Link Tool options
  • compiler represents the compiler name: ifort, icc (icpc, icl), cl, gcc (g++), gfortran, pgcc (pgcp), pgf77 (pgf90, pgf95, pgfortran), mpiic, mpiifort, mpic (mpic++), mpif77 (mpif90, mpif95)
  • options2 represents any number of compiler options


Allows you to go through all possible Intel MKL Link Tool supported options. The output provides libraries, options, or environment variables as in the inquiry mode, or a built application as in the compilation mode (depending on what you specify).

mkl_link_tool -interactive

Use the -help option for full help with the Intel MKL Link Tool and to show the defaults for the current system.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)