首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Cygwin中交叉编译pthread_mutex_timedlock有关问题

2012-06-29 
Cygwin中交叉编译pthread_mutex_timedlock问题今天编译Linux文件,遇到错误 pthread_mutex_timedlock was n

Cygwin中交叉编译pthread_mutex_timedlock问题

今天编译Linux文件,遇到错误

pthread_mutex_timedlock was not declared in this scope

?

网上查了下:

原文:http://stackoverflow.com/questions/3414834/gcc-stdthread-not-found-in-namespace-std

?

Works fine on Linux (g++ -std=c++0x -lpthread with no additional defines).

However, this thread on Cygwin mailing list suggests that, at least as of 4.4, _GLIBCXX_HAS_GTHREADS was disabled by an autoconf test when building libstdc++ because pthread implementation of cygwin is missing pthread_mutex_timedlock. Perhaps MinGW has the same problem.

Also, this thread on comp.lang.c++.moderated says the same thing. Not supported by the library.

?

原来Cygwin中gcc gcc-4.4.3以上就开始不支持?pthread_mutex_timedlock

?

即使加上参数 -std=c++0x -lpthread (在Linux可以正常)也无用

?

热点排行