本文介绍了std :: thread上的OpenPose链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此尝试从源代码构建OpenPose,并且遇到了链接问题.当前环境是Ubuntu 16.04.4.OpenCV版本是3.3.1.GCC版本是5.4.0.

So trying to build OpenPose from source, and was running into a linking problem. Current environment is Ubuntu 16.04.4. OpenCV version is 3.3.1. GCC version is 5.4.0.

[87%]链接CXX可执行文件1_extract_from_image.bin

[ 87%] Linking CXX executable 1_extract_from_image.bin

[87%]链接CXX可执行文件openpose.bin

[ 87%] Linking CXX executable openpose.bin

[ 87%] 链接 CXX 可执行文件 3_user_input_processing_and_output.bin

[ 87%] Linking CXX executable 3_user_input_processing_and_output.bin

[87%]链接CXX可执行文件2_extract_pose_or_heatmat_from_image.bin

[ 87%] Linking CXX executable 2_extract_pose_or_heatmat_from_image.bin

[87%]链接CXX可执行文件1_custom_post_processing.bin

[ 87%] Linking CXX executable 1_custom_post_processing.bin

[87%]链接CXX可执行文件2_user_processing_function.bin

[ 87%] Linking CXX executable 2_user_processing_function.bin

[88%]链接CXX可执行文件1_openpose_read_and_display.bin

[ 88%] Linking CXX executable 1_openpose_read_and_display.bin

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1:对 std :: thread :: _ St​​ate ::〜_State()@ GLIBCXX_3.4.22 的未定义引用>

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1: undefined reference to std::thread::_State::~_State()@GLIBCXX_3.4.22

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1:对 std :: thread :: _ M_start_thread(std :: unique_ptr< std :: thread :: _ St​​ate的未定义引用),std :: default_delete< std :: thread :: _ St​​ate>> ;、 void(*)())@ GLIBCXX_3.4.22

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1: undefined reference to std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1:对std :: thread :: _ St​​ate@GLIBCXX_3.4.22

/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/libopencv_objdetect.so.3.3.1: undefined reference to typeinfo for std::thread::_State@GLIBCXX_3.4.22

collect2:错误:ld返回1个退出状态

collect2: error: ld returned 1 exit status

examples/openpose/CMakeFiles/openpose.bin.dir/build.make:150:目标"examples/openpose/openpose.bin"的配方失败

examples/openpose/CMakeFiles/openpose.bin.dir/build.make:150: recipe for target 'examples/openpose/openpose.bin' failed

make [2]:*** [示例/openpose/openpose.bin]错误1

make[2]: *** [examples/openpose/openpose.bin] Error 1

CMakeFiles/Makefile2:1135:目标'examples/openpose/CMakeFiles/openpose.bin.dir/all'的配方失败

CMakeFiles/Makefile2:1135: recipe for target 'examples/openpose/CMakeFiles/openpose.bin.dir/all' failed

make [1]:*** [示例/openpose/CMakeFiles/openpose.bin.dir/all]错误2

make[1]: *** [examples/openpose/CMakeFiles/openpose.bin.dir/all] Error 2

make [1]:***等待未完成的工作....

make[1]: *** Waiting for unfinished jobs....

推荐答案

我只是遇到了同样的问题,并安装了最新版本的gcc和g ++,从而解决了该问题.像这儿: https://askubuntu.com/a/789417

I just had the same issue and installed the latest versions of gcc and g++, which solved the problem. Like here:https://askubuntu.com/a/789417

我刚刚安装了版本8(因此是gcc-8和g ++-8).然后,您必须按照此处所述调用update-Alternatives.

I just installed version 8 (thus gcc-8 and g++-8). Then you have to call update-alternatives as described there.

这篇关于std :: thread上的OpenPose链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 10:45