Developer Guide


Using the stdcall Calling Convention in C/C++

stdcall functionality has been deprecated and will be removed in a future release of the product.
Intel® oneAPI Math Kernel Library
supports stdcall calling convention for the following function domains:
  • BLAS, except CBLAS, compact API, and JIT API
  • Sparse BLAS (NIST-like interfaces only)
  • Vector Mathematics
  • Vector Statistics (VS)
  • Intel® oneAPI Math Kernel Library
  • RCI Iterative Solvers for Linear Problems (Iterative Sparse Solvers based on Reverse Communication Interface)
  • Support Functions
To use the stdcall calling convention in C/C++, follow the guidelines below:
  • In your function calls, pass lengths of character strings to the functions. For example, compare the following calls to the VS function
    errstatus = vslLoadStreamF(&stream, "streamfile.bin");
    errstatus = vslLoadStreamF(&stream, "streamfile.bin", 14);
  • Define the
    macro using either of the following techniques:
    • Define the macro in your source code before including
      Intel® oneAPI Math Kernel Library
      header files:
      ... #define MKL_STDCALL #include "mkl.h" ...
    • Pass the macro to the compiler. For example:
      icl -DMKL_STDCALL foo.c
  • Link your application with the following library:
    • mkl_intel_s.lib
      for static linking
    • mkl_intel_s_dll.lib
      for dynamic linking
      Avoid linking with the Single Dynamic Library
      because its support of the stdcall calling convention is limited.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at