Hi,
$ g++ -std=c++11 threadtest.cpp -o threadtest
/tmp/cc2mc1l4.o: In function `std::thread::threadvoid (*)()(void (*)())':
threadtest.cpp:(.text._ZNSt6threadC2IPFvvEIEEEOT_DpOT0_[_ZNSt6threadC5IPFvvEIEEEOT_DpOT0_]+0x1e):
undefined reference to `pthread_create'
collect2: error: ld returned
Package: g++-4.9
Version: 4.9.1-15
Severity: normal
Dear Maintainer,
when compiling a C++11 program that uses std::thread, I get the following
linker failure:
$ g++ -std=c++11 threadtest.cpp -o threadtest
/tmp/cc2mc1l4.o: In function `std::thread::threadvoid (*)()(void (*)())':
2 matches
Mail list logo