terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted (core dumped)
g++ (Ubuntu 4.8.4)下出现
解决增加 -Wl,--no-as-needed 需在-o a.out 之前,当然别忘了-std=c++11选项。
g++ -g -Wall -Wl,--no-as-needed -o aa main.cc tool.cc -lpthread -std=c++11 -I ./