c++ g++运行出现Enable multithreading to use std::thread: Operation not permitted解决

使用了c++11的thread库,运行出现了:

terminate called after throwing an instance of 'std::system_error'

  what():  Enable multithreading to use std::thread: Operation not permitted

Aborted

 

解决:g++ -std=c++11 -pthread -Wl,--no-as-needed thread_test.cpp

posted @ 2020-07-30 10:18  十里坡剑神—》》》》  阅读(764)  评论(0编辑  收藏  举报