Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/137.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 编译opencv错误:未定义对`typeinfo for std::thread::_State';_C++_Opencv_Cmake - Fatal编程技术网

C++ 编译opencv错误:未定义对`typeinfo for std::thread::_State';

C++ 编译opencv错误:未定义对`typeinfo for std::thread::_State';,c++,opencv,cmake,C++,Opencv,Cmake,我使用Ubuntu 16.04、GCC 5.5.0、opencv-3.0.0 以下是我的cmake命令: mkdir build && cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=../OpenCV -D WITH_CUDA=OFF -D ENABLE_FAST_MATH=0 -D CUDA_FAST_MATH=0 -D WITH_CUBLAS=0 -D WITH_CUDNN=OFF -D

我使用Ubuntu 16.04、GCC 5.5.0、opencv-3.0.0

以下是我的cmake命令:

mkdir build && cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=../OpenCV -D WITH_CUDA=OFF -D ENABLE_FAST_MATH=0 -D CUDA_FAST_MATH=0 -D WITH_CUBLAS=0 -D WITH_CUDNN=OFF -D WITH_OPENCL=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF -D WITH_IPP=OFF -D ENABLE_PRECOMPILED_HEADERS=OFF -D WITH_FFMPEG=OFF -D_GLIBCXX_USE_CXX11_ABI=0 ../opencv-3.0.0
然后我得到了一个错误:

[ 83%] Built target opencv_perf_superres
[ 83%] Building CXX object modules/core/CMakeFiles/opencv_test_core.dir/test/test_misc.cpp.o
[ 83%] Linking CXX executable ../../bin/opencv_test_objdetect
[ 85%] Building CXX object modules/core/CMakeFiles/opencv_test_core.dir/test/test_operations.cpp.o
../../lib/libopencv_objdetect.so.3.0.0: undefined reference to `typeinfo for std::thread::_State'
../../lib/libopencv_objdetect.so.3.0.0: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())'
../../lib/libopencv_objdetect.so.3.0.0: undefined reference to `std::thread::_State::~_State()'
collect2: error: ld returned 1 exit status
modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/build.make:125: recipe for target 'bin/opencv_test_objdetect' failed
make[2]: *** [bin/opencv_test_objdetect] Error 1
CMakeFiles/Makefile2:3060: recipe for target 'modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/all' failed
make[1]: *** [modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Building CXX object modules/core/CMakeFiles/opencv_test_core.dir/test/test_ptr.cpp.o
[ 85%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/test_rotation_and_scale_invariance.cpp.o
[ 85%] Building CXX object modules/calib3d/CMakeFiles/opencv_test_calib3d.dir/test/test_affine3.cpp.o
[ 85%] Building CXX object modules/imgproc/CMakeFiles/opencv_test_imgproc.dir/test/ocl/test_sepfilter2D.cpp.o
[ 85%] Building CXX object modules/imgproc/CMakeFiles/opencv_perf_imgproc.dir/perf/perf_resize.cpp.o
[ 85%] Built target opencv_perf_features2d
[83%]构建目标opencv\u perf\u superres
[83%]构建CXX对象模块/core/cmakfiles/opencv\u test\u core.dir/test/test\u misc.cpp.o
[83%]链接CXX可执行文件.././bin/opencv\u test\u objdetect
[85%]构建CXX对象模块/core/cmakfiles/opencv_test_core.dir/test/test_operations.cpp.o
../../lib/libopencv_objdetect.so.3.0.0:对“std::thread::_State”的未定义引用
../../lib/libopencv_objdetect.so.3.0.0:对“std::thread::_M_start_thread(std::unique_ptr,void(*))”的未定义引用
../../lib/libopencv_objdetect.so.3.0.0:对“std::thread::_State::~_State()”的未定义引用
collect2:错误:ld返回了1个退出状态
模块/objdetect/CMakeFiles/opencv_test_objdetect.dir/build.make:125:目标“bin/opencv_test_objdetect”的配方失败
生成[2]:***[bin/opencv\u test\u objdetect]错误1
CMakeFiles/Makefile2:3060:目标'modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/all'的配方失败
make[1]:***[modules/objdetect/CMakeFiles/opencv\u test\u objdetect.dir/all]错误2
make[1]:***等待未完成的工作。。。。
[85%]构建CXX对象模块/core/cmakfiles/opencv_test_core.dir/test/test_ptr.cpp.o
[85%]构建CXX对象模块/feature2d/cmakfiles/opencv_test_feature2d.dir/test/test_rotation_和_scale_不变性.cpp.o
[85%]构建CXX对象模块/calib3d/cmakfiles/opencv\u test\u calib3d.dir/test/test\u affine3.cpp.o
[85%]构建CXX对象模块/imgproc/cmakfiles/opencv_test_imgproc.dir/test/ocl/test_sepfilter2D.cpp.o
[85%]构建CXX对象模块/imgproc/CMakeFiles/opencv_perf_imgproc.dir/perf/perf_resize.cpp.o
[85%]构建的目标opencv性能特性2d
我该如何解决这个问题


谢谢你帮助我

您在安装过程中遵循了哪些步骤,您可以共享您遵循的任何链接吗?