我已经搜索了上述错误;没用。
此错误来自以下代码行:
void Thread::join(void** status) {
pthread_join(thread, status);
}
任何人都知道这意味着什么?
(谷歌提出了其他人对这个错误的抱怨,但没有解释它。)
答案 0 :(得分:2)
namespace __gnu_cxx
{
// 6.7[stmt.dcl]/4: If control re-enters the declaration (recursively)
// while the object is being initialized, the behavior is undefined.
// Since we already have a library function to handle locking, we might
// as well check for this situation and throw an exception.
// We use the second byte of the guard variable to remember that we're
// in the middle of an initialization.
class recursive_init: public std::exception
....
static int
acquire_1 (__guard *g)
{
if (_GLIBCXX_GUARD_TEST (g))
return 0;
if (recursion_push (g))
{
#ifdef __EXCEPTIONS
throw __gnu_cxx::recursive_init();
...
请检查是否有一些静态变量需要先自己初始化。