Building a Custom Dynamic-link Library in the Visual Studio* Development System
You can build a custom dynamic-link library (DLL) in the Microsoft Visual Studio* Development System (VS*). To do this, use projects available in the
directory. The directory contains subdirectories with projects for the respective versions of the Visual Studio Development System, for example,
tools\builder\MSVS_Projects
subdirectory of the
Intel® oneAPI Math Kernel Library
VS2012
. For each version of VS two solutions are available:
- libia32.slnbuilds a custom DLL for the IA-32 architecture.
- libintel64.slnbuilds a custom DLL for the Intel® 64 architecture.
The builder uses the following default settings for the custom DLL:
- Interface:
- cdecl for the IA-32 architecture and LP64 for the Intel 64 architecture
- Error handler:
- NativeIntel® oneAPI Math Kernel Libraryxerbla
- Create Microsoft manifest:
- yes
- List of functions:
- in the project's source fileexamples.def
To build a custom DLL:
- Set theMKLROOTenvironment variable with the installation directory of theversion you are going to use.Intel® oneAPI Math Kernel Library
- Open thelibia32.slnorlibintel64.slnsolution depending on the architecture of your system.The solution includes the following projects:
- i_malloc_dll
- vml_dll_core
- cdecl_parallel(inlibia32.sln) orlp64_parallel(inlibintel64.sln)
- cdecl_sequential(inlibia32.sln) orlp64_sequential(inlibintel64.sln)
- [Optional] To change any of the default settings, select the project depending on whether the DLL will usefunctions in the sequential or multi-threaded mode:Intel® oneAPI Math Kernel Library
- In thelibia32solution, select thecdecl_sequentialorcdecl_parallelproject.
- In thelibintel64solution, select thelp64_sequentialorlp64_parallelproject.
- [Optional] To include your own error handler in the DLL:
- SelectProject>Properties>Configuration Properties>Linker>Input.
- Add<user_xerbla>.obj
- [Optional] To turn off creation of the manifest:
- SelectProject>Properties>Configuration Properties>Linker>Manifest File>Generate Manifest.
- Select: no.
- [Optional] To change the list of functions to be included in the DLL:
- SelectSource Files.
- Edit theexamples.deffile. Refer to Specifying Function Names for how to specify entry points.
- To build the library, selectBuild>Build Solution.