I'm working on Ubuntu 20.04.1 with gcc 9.4.0 installed. I have installed both libtbb2 and libtbb-dev via apt. Yet I simply can't compile this little example :
#include <execution>
#include <algorithm>
#include <vector>
int main(){
std::vector<int> in = {1,2,3,4,5};
std::vector<int> out(in.size());
std::transform(std::execution::par, in.begin(), in.end(), out.begin(), [](int i){return i+2;});
return 0;
}
I try to compile with g++ --std=gnu++17 -ltbb test.cpp
but this gives me a pile of errors like : undefined reference to "tbb::something::function"
WARNING : No, this is not a duplicate of this question since I DID install the libraries. This is a linkage problem, not a missing library one.