Developer Guide
Developer Guide for Intel® oneAPI Math Kernel Library macOS*
A newer version of this document is available. Customers should click here to go to the newest version.
Using the Command-Line Link Tool
Use the command-line Link Tool provided by Intel® oneAPI Math Kernel Library to simplify building your application with Intel® oneAPI Math Kernel Library.
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>/bin/<arch> directory, and supports the modes described in the following table.
| Mode | Description | Usage | Example | 
|---|---|---|---|
Inquiry  |  
       The tool returns the compiler options, libraries, or environment variables necessary to build and execute the application.  |  
       Get Intel® oneAPI Math Kernel Library libraries  |  
       mkl_link_tool -libs [oneMKL Link Tool options]  |  
      
Get compilation options  |  
       mkl_link_tool -opts [oneMKL Link Tool options]  |  
      ||
Get environment variables for application executable  |  
       mkl_link_tool -env [oneMKL Link Tool options]  |  
      ||
Compilation  |  
       The Intel® oneAPI Math Kernel Library Link Tool builds the application.  |  
       —  |  
       mkl_link_tool [options] <compiler> [options2] file1 [file2 ...] where: 
  |  
      
Interactive  |  
       Allows you to go through all possible Intel® oneAPI Math Kernel Library 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® oneAPI Math Kernel Library Link Tool and to show the defaults for the current system.