mips交叉编译 error: 'PTHREAD_MUTEX_ERRORCHECK_NP' was not declared in this scope
2016-11-28 17:06
651 查看
在mips交叉编译时,设置互斥锁时,报以下错误,始终编译不过去。
error: 'PTHREAD_MUTEX_ERRORCHECK_NP' was not declared in this scope
各种百度,相关信息一条也没有找到,实在没办法了,各种尝试。
打开linux平台和mips平台的pthread.h一对比才恍然大悟,原来在mips平台上,互斥锁类型使用的是:
#define PTHREAD_MUTEX_NORMAL 0
#define PTHREAD_MUTEX_DEFAULT 0
#define PTHREAD_MUTEX_RECURSIVE 1
#define PTHREAD_MUTEX_ERRORCHECK 2
修改之后,一切都顺利的通过了。
看来以后,遇事还得仔细分析,多看源码,不能依靠百度,盲目百度。
error: 'PTHREAD_MUTEX_ERRORCHECK_NP' was not declared in this scope
各种百度,相关信息一条也没有找到,实在没办法了,各种尝试。
打开linux平台和mips平台的pthread.h一对比才恍然大悟,原来在mips平台上,互斥锁类型使用的是:
#define PTHREAD_MUTEX_NORMAL 0
#define PTHREAD_MUTEX_DEFAULT 0
#define PTHREAD_MUTEX_RECURSIVE 1
#define PTHREAD_MUTEX_ERRORCHECK 2
修改之后,一切都顺利的通过了。
看来以后,遇事还得仔细分析,多看源码,不能依靠百度,盲目百度。
相关文章推荐
- In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope
- 编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope
- error: 'memcpy' was not declared in this scope的解决 [转]
- 用g++ 编译 ffmpeg 编译出现 error: 'UINT64_C' was not declared in this scope 或 missing -D__STDC_CONSTANT_MACROS
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
- [Error] 'exit' was not declared in this scope的解决方法
- error: 'LOGE' was not declared in this scope
- linux 编译ffmpeg 出错:error: 'UINT64_C' was not declared in this scope
- error:inet_addr() was not declared in this scope
- error: ‘errno’ was not declared in this scope
- opencv 中的错误error: ‘SurfFeatureDetector’ was not declared in this scope
- error: 'system' was not declared in this scope
- error: ‘exit’ was not declared in this scope
- error: ‘closesocket’ was not declared in this scope
- error: 'UINT64_C' was not declared in this scope
- 文档源代码opencv 中的错误error: ‘SurfFeatureDetector’ was not declared in this scope
- error: '_localtime_not_threadsafe_' was not declared in this scope
- Solution to error: ‘_1’ was not declared in this scope under C++11 standard
- error: `cout' was not declared in this scope