I created and executed a simple thread on my system. when I execute this program, I have the error message : Enable multithreading to use std::thread: Operation not permitted
some details about my system :
- linux ubuntu 13.10
- g++ 4.8.1
I compile the source code including the library pthread
The source code:
#include <iostream>
#include <thread>
using namespace std;
void func(void) {
cout << "test thread" << endl;
}
int main() {
cout << "start" << endl;
thread t1 (func);
t1.join();
cout << "end" << endl;
return 0;
}