Compile and Link Intel® IPP Libraries with Microsoft Visual Studio* and Intel® C++ Compiler

ID 672592
Updated 9/25/2024
Version Latest
Public

Intel® IPP is an extensive library of ready-to-use, domain-specific functions highly optimized for diverse Intel® architectures.

author-image

By

Automatically Use Intel® Integrated Performance Primitives (Intel® IPP) Libraries in Microsoft Visual Studio* 2022

To use Intel® IPP libraries automatically, you need to link your application to the Intel IPP library. To do this, follow these steps:
 

  1. In Microsoft Visual Studio* 2022, select Solution Explorer.
     
  2. In the Solution Explorer view, select Configuration Properties, then Intel® Libraries for oneAPI, and then Use Intel® IPP.

    See figure 1.

Figure 1. Use Intel IPP in Visual Studio 2022

 

  1. Select your linking mode. Options include:
  • No: Disables the use of Intel IPP libraries.
  • Default Linking Method: Uses dynamic Intel IPP libraries.
  • Static Library: Uses static Intel IPP libraries. Static linking results in a stand-alone executable.
  • Dynamic Library: Uses dynamic Intel IPP libraries and defers function resolution until runtime. This mode requires bundling redistributable libraries with your application.

 

  1. Select Apply to apply your changes to your project.

In Visual Studio 2022, you do not need to set environment variables manually. Once you allow it to use Intel IPP libraries and apply a linking mode, the paths for Intel IPP header files and library files are automatically added to include directories and library directories.

To check the include and library directories, select Properties, then VC++ Directories, and then Edit Include Directories. See figure 2 and figure 3.

 

Figure 2. Include directories in Visual Studio 2022

 

Figure 3. Library directories in Visual Studio 2022

 

You can now use Intel IPP libraries in your program and build your application directly.

 

Manually Use Intel IPP Libraries in Microsoft Visual Studio 2017

If you did not install the integration plug-in, you can configure Visual Studio 2017 to build Intel IPP applications by following these steps.

Set the Path for Intel IPP Header Files

  1. Select Solution Explorer.
     
  2. In the Solution Explorer view, select Properties, then Configuration Properties, and then VC++ Directories.
     
  3. In the Include Directories drop-down list, select the <edit> option.
     
  4. To add a new line, select the button, and then select the include subdirectory under the Windows folder of the Intel IPP installation path.

    The default Intel IPP header files should be saved in the following path:

    Files (x86)\Intel\oneAPI\ipp\2021.12\include

Set the Path for Intel IPP Library Files

  1. In the Library Directories drop-down list, select the <edit> option. Add new lines, and select the lib subdirectory under the Windows folder of the Intel IPP installation path.

    Library files should be saved in the following path:

    Files (x86)\Intel\oneAPI\ipp\2021.12\lib

Link the Required Intel IPP Library to Your Project

  1. Select Linker, then Input, and then Additional Dependencies.
     
  2. Insert the required Intel IPP libraries as additional dependencies (for example, dynamic link: ippi.lib ipps.lib ippcore.lib or static link: ippimt.lib ippsmt.lib ippcorelmt.lib).

    All of these library files should be saved in the following path by default:

    Files (x86)\Intel\oneAPI\ipp\2021.12\lib

    You can also find the installation path in the macros list, as shown in figure 4.

null

Figure 4. Add an Intel IPP link file as an additional dependency

Integrate Intel Intel® C++ Compiler in Visual Studio

You can integrate Intel® C++ Compiler as a subcomponent of Intel® oneAPI Base Toolkit or as a stand-alone component into Visual Studio. Once you fully install Intel® oneAPI Base Toolkit or select to install Intel C++ Compiler in Visual Studio, you can select Intel C++ Compiler to use for your project.
 

  1. Select the project in Visual Studio.
     
  2. Select Intel Compiler, then Use Intel C++. Figure 5 shows how to switch between the Intel C++ Compiler and the Visual C++* compiler.

null

Figure 5. Use Intel C++ Compiler to build projects

 

Verify that the include path and library path of Intel C++ Compiler and Intel IPP have been added automatically. To do this:
 

  1. Select the project.
     
  2. Select Properties, then VC++ Directories, and then Include Directories/Library.

    Make sure that the following paths have been added to include directories:

    C:\Program Files (x86)\Intel\oneAPI\compiler\2024.2\include
    C:\Program Files (x86)\Intel\oneAPI\compiler\2024.2\opt\compiler\include


    Verify that the following paths have been added to library directories:

    C:\Program Files (x86)\Intel\oneAPI\compiler\2024.2\lib
    C:\Program Files (x86)\Intel\oneAPI\compiler\2024.2\opt\compiler\lib
     
  3. Review the steps in Automatically Use Intel® Integrated Performance Primitives (Intel® IPP) Libraries in Microsoft Visual Studio 2022 IDE.
  • Make sure that the Use Intel® IPP option is selected.
  • Also check that all related Intel IPP include directories and library directories have been added.