Intel® Advisor User Guide

ID 766448
Date 11/07/2023
Public

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

Document Table of Contents

Building an Application on Windows* OS

Building from a Microsoft Visual Studio* Command Prompt

NOTE:
In Visual Studio* 2022, Intel Advisor provides lightweight integration. You can configure and compile your application and open the standalone Intel Advisor interface from the Visual Studio for further analysis. All your settings will be inherited by the standalone Intel Advisor project.

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.