qtcreator CMake ROS package error

asked 2016-12-03 20:41:21 -0500

yin gravatar image

hello, I use qtcreator open ROS package CMakeLists.txt file and CMake, but it can not run ok.

And in CMakeError.log, the error as follow, I don't know why -lpthreads can not find:

Building C object CMakeFiles/cmTryCompileExec38806602.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec38806602.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec38806602
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec38806602.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec38806602.dir/CheckFunctionExists.c.o  -o cmTryCompileExec38806602 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
edit retag flag offensive close merge delete