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

诸位正值青春年少,一定恣情放纵,贪恋香艳梅施之情,喜欢风流雅韵之事,洒脱木拘。然而诸位可知,草上露一碰即落,竹上霜一触即溶,此种风情难于长久。
原文地址:https://www.cnblogs.com/shilipojianshen/p/13402270.html