【发布时间】:2026-02-20 06:20:11
【问题描述】:
我正在尝试使用 Intel Thread Building Blocks 调试 C++ 代码,使用我在此处找到的过程 Debugging in threading building Blocks。 我的问题与下面这句话有关。
确保编译时宏 TBB_USE_DEBUG 设置为 1,以便启用 TBB 的检查。
我添加了宏#define TBB_USE_DEBUG 1
在我的主要功能开始时。但是,在编译时我收到以下警告
warning: "TBB_USE_DEBUG" redefined
#define TBB_USE_DEBUG 1
/usr/include/tbb/tbb_config.h:287:0: note: this is the location of the previous definition
#define TBB_USE_DEBUG 0
因此我的两个问题:
- 我把宏放在好地方了吗?
- 如何检查我的代码是否确实与调试库链接?
【问题讨论】: