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

时间:2020-07-30 10:51:11   收藏:0   阅读:112

使用了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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!