构建特征时pthread / pthreads错误

时间:2017-07-04 04:12:53

标签: c++ pthreads eigen

我正在尝试构建特征库(C ++)。我已经安装了所有依赖项,我正在运行cmake来构建库。关于pthreads,以下是cmake在我的系统中配置和发现的内容:

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found

以后,cmake停止并出现以下错误:

/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_11c0c.dir/CheckFunctionExists.c.o  -o cmTC_11c0c -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status

我发现pthreadpthreads是相同的库,并且对于不同的体系结构命名不同。如果我的系统中有pthread,那么为什么cmake会查找pthreads。有没有办法让这个工作?

0 个答案:

没有答案