>>> include_dirs=http://www.likecs.com/home/edward/git/libs/openpose2021/include;/usr/include;/usr/include;/usr/include;/usr/local/include/opencv4;/home/edward/git/libs/openpose2021/3rdparty/caffe/include/caffe;/home/edward/git/libs/openpose2021/PUBLIC;/usr/local/cuda/include;/home/edward/git/libs/openpose2021/PUBLIC;/usr/include;/usr/local/cuda/include
目录中:/home/edward/git/libs/openpose2021/include/openpose_private/tracking/pyramidalLK.hpp
所以怎么会找不到这个文件呢?一时也不知道如何修改,所以直接修改代码,用绝对路径:
#include </home/edward/software/openpose/include/openpose_private/tracking/pyramidalLK.hpp>
其他类似问题也依靠这个来解决。---有没有大牛可以帮忙解答一下?
几乎所有的都和.cu文件相关。--
找不到头文件caffe/blob.hpp:
home/edward/git/libs/openpose2021/src/openpose/core/arrayCpuGpu.cpp:3:14: fatal error: caffe/blob.hpp:
这个是在 Caffe_INCLUDE_DIRS 配置上需要修改:
/home/edward/git/libs/openpose2021/3rdparty/caffe/include
找不到头文件caffe/proto/caffe.pb.h:
In file included from /home/edward/git/libs/openpose2021/src/openpose/core/arrayCpuGpu.cpp:3:
/home/edward/git/libs/openpose2021/3rdparty/caffe/include/caffe/blob.hpp:9:10: fatal error: caffe/proto/caffe.pb.h: No such file or directory
#include "caffe/proto/caffe.pb.h"
这个问题和以前的问题还不一样,这些都是build的时候出现的头文件。这个文件在:
/home/edward/git/libs/openpose2021/3rdparty/caffe/build/include/caffe/proto/caffe.pb.h
也先直接用绝对路径来解决。
也可以在cmake-gui 中, Caffe_INCLUDE_DIRS 配置为
/home/edward/git/libs/openpose2021/3rdparty/caffe/include;/home/edward/git/libs/openpose2021/3rdparty/caffe/build/include
连接错误undefined reference to symbol \'cudaFree@@libcudart.so.11.0\'
这个是在:
[ 97%] Building CXX object examples/tests/CMakeFiles/resizeTest.bin.dir/resizeTest.cpp.o
也就是一个测试例子,看看能不能删除这个例子。
/usr/bin/ld: CMakeFiles/resizeTest.bin.dir/resizeTest.cpp.o: undefined reference to symbol \'cudaFree@@libcudart.so.11.0\'
/usr/bin/ld: /usr/local/cuda/lib64/libcudart.so.11.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
cudaFree symbol is defined in libcudart.so. It should be located in /usr/local/cuda/lib with a default install.(DSO is a dynamic shared object or a shared library)
解决办法:直接把这个例子全部注释掉,幸好只有一个例子受到影响
执行文件时出现No OpenGL support:
./build/examples/openpose/openpose.bin --video examples/media/video.avi
当cmake和make编译均通过之后,执行文件时出现该错误
OpenCV Error: No OpenGL support (Library was built without OpenGL support) in CvWindow,
file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/highgui/src/window_QT.cpp, line 1642
terminate called after throwing an instance of \'cv::Exception\'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/highgui/src/window_QT.cpp:1642:
error: (-218) Library was built without OpenGL support in function CvWindow