//test.cpp
#include<iostream>
#include<thread>
using namespace std;
void call()
{
cout<<"hello world"<<endl;
}
int main()
{
thread t(call);
t.join();
return 0;
}g++-4.7 -std=c++11 test.cpp -o test -pthread上面的代码编译得很完美,但是当我运行./测试时。我只收到一条错误消息,上面写着“纯虚拟方法调用,终止调用,没有活动异常”。
有谁可以帮我?谢谢!
发布于 2012-12-19 10:27:57
这是一个已知的错误。见bug.cgi?id=12730。
不幸的是,没有人试图修复它。
https://stackoverflow.com/questions/11878811
复制相似问题