【发布时间】:2015-09-03 08:57:06
【问题描述】:
我已经为 Raspberry Pi 使用了已编译的 openCV 版本。 link for anyone who is interested
尝试使用此命令行编译后
g++ test3.cpp -o test3 -I/usr/local/include/ -lraspicam -lraspicam_cv -L/opt/vc/lib -lmmal -lmmal_core -lmmal_util -I/usr/include -lopencv_core -lopencv_highgui -lopencv_imgproc -lwiringPi -lpthread
我收到以下错误行。
//usr/local/lib/libopencv_stitching.so.2.4:未定义引用`cv::gpu::ensureSizeIsEnough(int, int, int, cv::gpu::GpuMat&)'
//usr/local/lib/libopencv_calib3d.so.2.4: undefined reference to `cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double)'
//usr/local/lib/libopencv_calib3d.so.2.4: undefined reference to `typeinfo for cv::ParallelLoopBody'
//usr/local/lib/libopencv_calib3d.so.2.4:未定义对`cv::Mutex::unlock()'的引用
//usr/local/lib/libopencv_calib3d.so.2.4: 未定义引用`cv::Mutex::lock()'
//usr/local/lib/libopencv_ocl.so.2.4: 未定义对 cv::TLSDataContainer::getData() const 的引用
//usr/local/lib/libopencv_features2d.so.2.4: undefined reference to cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, unsigned char&, bool, unsigned char (cv::Algorithm: :)(), void (cv::Algorithm::)(unsigned char), std::basic_string, std::allocator > const&)
//usr/local/lib/libopencv_features2d.so.2.4: undefined reference to `cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, float&, bool, float (cv::Algorithm:: )(), void (cv::Algorithm::)(float), std::basic_string, std::allocator > const&)'
//usr/local/lib/libopencv_features2d.so.2.4: 未定义引用`cv::AlgorithmInfo::addParam(cv::Algorithm&, char const*, short&, bool, int (cv::Algorithm:: )(), void (cv::Algorithm::)(int), std::basic_string, std::allocator > const&)'
//usr/local/lib/libopencv_calib3d.so.2.4: 未定义引用`cv::Mutex::Mutex()'
//usr/local/lib/libopencv_ocl.so.2.4:未定义对`cv::TLSDataContainer::TLSDataContainer()'的引用
//usr/local/lib/libopencv_calib3d.so.2.4: 未定义引用`cv::ParallelLoopBody::~ParallelLoopBody()'
//usr/local/lib/libopencv_calib3d.so.2.4: 未定义引用`cv::Mutex::~Mutex()'
//usr/local/lib/libopencv_ocl.so.2.4: 未定义对 `cv::TLSDataContainer::~TLSDataContainer()' 的引用 collect2: ld 返回 1 个退出状态
【问题讨论】: