编译ssd至build时全部错误cv::未定义等

来源:互联网 发布:胸肌下轮廓 知乎 编辑:程序博客网 时间:2024/06/05 11:05
错误中的一部分:build/lib/libcaffe.a(image_io.o): In function caffe::ReadVideoToVolumeDatum(char const*, int, int, int, int, int, int, caffe::VolumeDatum*)': image_io.cpp:(.text+0x1905): undefined reference tocv::VideoCapture::VideoCapture()'
image_io.cpp:(.text+0x1abe): undefined reference to cv::VideoCapture::open(cv::String const&)' image_io.cpp:(.text+0x1ace): undefined reference tocv::VideoCapture::isOpened() const'
image_io.cpp:(.text+0x1c91): undefined reference to cv::VideoCapture::~VideoCapture()' image_io.cpp:(.text+0x1d22): undefined reference tocv::VideoCapture::get(int) const'
image_io.cpp:(.text+0x1d6d): undefined reference to cv::VideoCapture::set(int, double)' image_io.cpp:(.text+0x1de1): undefined reference tocv::VideoCapture::set(int, double)'
image_io.cpp:(.text+0x1e35): undefined reference to cv::VideoCapture::read(cv::_OutputArray const&)' image_io.cpp:(.text+0x1f7e): undefined reference tocv::VideoCapture::release()'

image_io.cpp:(.text+0x1fc3): undefined reference to cv::VideoCapture::read(cv::_OutputArray const&)' image_io.cpp:(.text+0x22e9): undefined reference tocv::VideoCapture::~VideoCapture()'



解决方法:

在Makefile文件中找到第195行如:

ifeq ($(USE_OPENCV), 1)
    LIBRARIES +=

在LIBRARIES后添加opencv_videoio和opencv_imgcodecs然后重新编译即可

阅读全文
0 0