I'm trying to use the <execution>
header from the C++ standard library. However, adding #include <execution>
to my file causes the following error when I try to compile:
/usr/bin/ld: /tmp/ccO0ZngO.o: in function `tbb::interface7::task_arena::current_thread_index()':
/usr/include/tbb/task_arena.h:449: undefined reference to `tbb::interface7::internal::task_arena_base::internal_current_slot()'
collect2: error: ld returned 1 exit status
I am compiling using C++17 (using flag -std=c++17
) and g++ version 9.3.0 on Ubuntu 20.04. I installed libtbb-dev
using apt
and have tried compiling with and without the flag -ltbb
but get the same error either way.
(For reference my full compilation command is g++ -std=c++17 -ltbb -g <source file> -o <output file>
)