Visible to Intel only — GUID: GUID-A53E89B6-A0AA-467E-B5BD-83DDC4407467
Visible to Intel only — GUID: GUID-A53E89B6-A0AA-467E-B5BD-83DDC4407467
Linking on Intel(R) 64 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 with icl:
Static linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library supporting the LP64 interface:
ifort myprog.f mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib
libiomp5md.libDynamic linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library supporting the LP64 interface:
ifort myprog.f mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib
libiomp5md.libStatic linking of myprog.f and sequential version of Intel® oneAPI Math Kernel Library supporting the LP64 interface:
ifort myprog.f mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib
Dynamic linking of myprog.f and sequential version of Intel® oneAPI Math Kernel Library supporting the LP64 interface:
ifort myprog.f mkl_intel_lp64_dll.lib mkl_sequential_dll.lib mkl_core_dll.lib
Static linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library supporting the ILP64 interface:
ifort myprog.f mkl_intel_ilp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
Dynamic linking of myprog.f and OpenMP* threadedIntel® oneAPI Math Kernel Library supporting the ILP64 interface:
ifort myprog.f mkl_intel_ilp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib
libiomp5md.libDynamic linking of user code myprog.f and OpenMP* threadedor sequential Intel® oneAPI Math Kernel Librarysupporting the LP64 or ILP64 interface (Call appropriate functions or set environment variables to choose threaded or sequential mode and to set the interface):
ifort myprog.f mkl_rt.lib
Static linking of myprog.f, Fortran BLAS and 95 LAPACK interfaces, and OpenMP* threadedIntel® oneAPI Math Kernel Library supporting the LP64 interface:
ifort myprog.f mkl_lapack95_lp64.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
Static linking of myprog.c and Intel® oneAPI Math Kernel Library threaded with Intel® Threading Building Blocks (Intel® TBB), provided that the LIB environment variable contains the path to Intel TBB library:
icl myprog.c /link /libpath:%MKLPATH% -I%MKLINCLUDE% mkl_intel_lp64.lib mkl_tbb_thread.lib mkl_core.lib tbb12.lib /MD
Dynamic linking of myprog.c and Intel® oneAPI Math Kernel Library threaded with Intel® TBB, provided that the LIB environment variable contains the path to Intel® TBB library:
icl myprog.c /link /libpath:%MKLPATH% -I%MKLINCLUDE% mkl_intel_lp64_dll.lib mkl_tbb_thread_dll.lib mkl_core_dll.lib tbb12.lib /MD