Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Windows*

ID 766692
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Linking on IA-32 Architecture Systems

The following examples illustrate linking that uses Intel(R) compilers.

Most examples use the .f Fortran source file. C/C++ users should instead specify a .cpp (C++) or .c (C) file and replace ifort withicx.

In these examples, MKLPATH=%MKLROOT%\lib32, and MKLINCLUDE=%MKLROOT%\include.

  • Static linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library (oneMKL) supporting the cdecl interface:

    ifort myprog.f mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib

  • Dynamic linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library (oneMKL) supporting the cdecl interface:

    ifort myprog.f mkl_intel_c_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib

  • Static linking of myprog.f and sequential version of Intel® oneAPI Math Kernel Library (oneMKL) supporting the cdecl interface:

    ifort myprog.f mkl_intel_c.lib mkl_sequential.lib mkl_core.lib

  • Dynamic linking of myprog.f and sequential version of Intel® oneAPI Math Kernel Library (oneMKL) supporting the cdecl interface:

    ifort myprog.f mkl_intel_c_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib

  • Static linking of myprog.f, Fortran BLAS and 95 LAPACK interfaces, and OpenMP* threadedIntel® oneAPI Math Kernel Library (oneMKL) supporting the cdecl interface:

    ifort myprog.f mkl_lapack95.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib

  • Static linking of myprog.c and Intel® oneAPI Math Kernel Library (oneMKL) threaded with Intel® Threading Building Blocks (Intel® TBB), provided that the LIB environment variable contains the path to Intel TBB library:

    icx myprog.c /link /libpath:%MKLPATH% -I%MKLINCLUDE% mkl_intel.lib mkl_tbb_thread.lib mkl_core.lib tbb12.lib /MD

  • Dynamic linking of myprog.c and Intel® oneAPI Math Kernel Library (oneMKL) threaded with Intel® TBB, provided that the LIB environment variable contains the path to Intel® TBB library:

    icx myprog.c /link /libpath:%MKLPATH% -I%MKLINCLUDE% mkl_intel_dll.lib mkl_tbb_thread_dll.lib mkl_core_dll.lib tbb12.lib /MD