User Guide

Contents

Building an Application on Windows* OS

Building from a Microsoft Visual Studio* Command Prompt

After you open a Visual Studio* command prompt and set up the proper paths for using the Threading Building Blocks (TBB) library, use one of the following command lines to build a Release executable for a running example:
  • With Threading Building Blocks (TBB) 2019 or higher:
    cl /EHsc /DTBB_USE_THREADING_TOOLS example.cpp tbb.lib
  • With TBB version lower than 2019:
    cl /EHsc /DTBB_PREVIEW_FLOW_GRAPH_TRACE example.cpp tbb_preview.lib
These command lines define the required macro and link the application against the appropriate
tbb
library, based on the TBB 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 TBB version you use.
  1. Open the
    Project Properties
    dialog box, and select
    Configuration Properties
    C/C++
    Command Line
    . In the
    Additional Options
    textbox, enter one of the following:
    • For TBB versions lower than 2019:
      /DTBB_PREVIEW_FLOW_GRAPH_TRACE
    • For TBB 2019 or higher:
      /DTBB_USE_THREADING_TOOLS
    project properties dialog
  2. Select
    Configuration Properties
    Linker
    Input
    .
  3. In the
    Additional Dependencies
    field:
    • For a Release build: Enter
      tbb_preview.lib
      for TBB versions lower than 2019 or
      tbb.lib
      for TBB version 2019 or higher.
    • For a Debug build: Enter
      tbb_preview_debug.lib
      for TBB versions lower than 2019 or
      tbb_debug.lib
      for TBB version 2019 and higher.
    additional dependencies dialog

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserverd for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804