Intel® Advisor User Guide

ID 766448
Date 3/31/2023
Public

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

Document Table of Contents

Enable Intel® oneAPI Threading Building Blocks (oneTBB) in your Build Environment

If you use the Intel® C++ Compiler Classic or Intel® oneAPI DPC++/C++ Compiler from the command line, specify the following option when you build your program:

  • For Windows* OS: /Qtbb

  • For Linux* OS: -tbb

This option tells the compiler to link with the Intel® oneAPI Threading Building Blocks (oneTBB) libraries. If you use other compilers, please see your oneTBB or compiler documentation.

NOTE:

With Intel Advisor samples, to use the oneTBB project (_tbb), you might need to define the TBBROOT environment variable (see the help topic Define the TBBROOT Environment Variable) and specify the TBBROOT/include directory as an additional include path when compiling (in build properties on Windows OS).

The following instructions are for using the Visual Studio* development environment on a Windows OS system.

Modify the project properties for each of your Visual Studio project build configurations (debug, release, and so on). You can set multiple properties by using the Configuration Properties with Visual Studio:

  1. In Solution Explorer, select (click) the name of one or more projects. To select multiple projects, hold down the Ctrl key.
  2. With Visual Studio:

    • Right-click the project name(s) and select Configuration Properties > Intel Performance Libraries > Intel oneAPI Threading Building Blocks.
    • On the Use oneTBB line, specify Yes.

    NOTE:

    If you change the version of oneTBB or the Visual Studio version installed on your system, you may see build errors related to oneTBB libraries. In this case, reset the integration by repeating the above steps to uncheck, and then check, the Use oneTBB box. See the Intel Advisor release notes for more information.

  3. Click OK to save the specified properties.
  4. Repeat the steps above for other configurations.

This procedure defines multiple properties to set up your build environment to use oneTBB .