Intel® Advisor Help

Building an Application on Windows* OS

Building from a Microsoft Visual Studio* Command Prompt

Note

Support for Microsoft* Visual Studio* 2017 is deprecated as of the Intel® oneAPI 2022.1 release, and will be removed in a future release.

After you open a Microsoft Visual Studio* command prompt and set up the proper paths for using the Intel® oneAPI Threading Building Blocks (oneTBB) library, use the following command line to build a Release executable for a running example:

cl /EHsc /DTBB_USE_THREADING_TOOLS example.cpp tbb.lib

This command defines the required macro and link the application against the appropriate tbb library, based on the oneTBB version you use.

Building from a Microsoft Visual Studio* IDE

To build a Release configuration of your application within a Microsoft Visual Studio* IDE, you must change your project to define the TBB_PREVIEW_FLOW_GRAPH_TRACE/TBB_USE_THREADING_TOOLS macro and link against the tbb_preview.lib/tbb.lib, as shown below for the Microsoft Visual Studio* 2015 IDE based on the oneTBB version you use.

  1. Open the Project Properties dialog box, and select Configuration Properties > C/C++ > Command Line. In the Additional Options textbox, enter /DTBB_USE_THREADING_TOOLS.

  2. Select Configuration Properties > Linker > Input.

  3. In the Additional Dependencies field:

    • For a Release build: Enter tbb.lib.

    • For a Debug build: Enter tbb_debug.lib.