run.sh fails to link when using <random>
alexanderlinne opened this issue · 0 comments
alexanderlinne commented
On brach devel
, using the code
#include <random>
int main() {
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(0, 65536);
distr(gen);
}
the call
<path-to-TypeART>/build/scripts/run.sh <path-ot-TypeART>/test/runtime/56_test.cpp 2>&1
produces the linker error
/usr/bin/ld: <path-to-TypeART>/test/runtime/56_test.o: in function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)':
56_test.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag]+0xb1): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_use_local_data()'
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)