opencv make错误: undefined reference to `cv::

daisiar 发布于 2015/12/02 17:19
阅读 19K+
收藏 0
ubuntu14.04 opencv2.4.11 make *.cpp/.o文件时的错误 诚请高手指教!!

chu@ubuntu :~/trafficintelligence/c$ make feature-based-tracking
g++ -Wall -W -Wextra -std=c++11 -DUSE_OPENCV -DLINUX -O3 --fast-math -DNDEBUG -L../../klt -L/home/chu/trafficintelligence/trajectorymanagementandanalysis/trunk/src/TrajectoryManagementAndAnalysis -L/usr/local/lib feature-based-tracking.o utils.o Motion.o Parameters.o cvutils.o -o ../bin/feature-based-tracking -lm -lTrajectoryManagementAndAnalysis -lsqlite3 -lboost_program_options -lopencv_highgui -lopencv_core -lopencv_video -lopencv_ml -lopencv_features2d -lopencv_imgproc -lopencv_objdetect
feature-based-tracking.o: In function `drawMatchesRelative(std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, std::vector<cv::DMatch, std::allocator<cv::DMatch> >&, cv::Mat&)':
feature-based-tracking.cpp:(.text+0x181): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
feature-based-tracking.cpp:(.text+0x205): undefined reference to `cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'
feature-based-tracking.o: In function `drawOpticalFlow(std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > const&, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > const&, std::vector<unsigned char, std::allocator<unsigned char> >, cv::Mat&)':
feature-based-tracking.cpp:(.text+0x324): undefined reference to `cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)'
feature-based-tracking.cpp:(.text+0x3ba): undefined reference to `cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'
feature-based-tracking.o: In function `trackFeatures(KLTFeatureTrackingParameters const&)':
feature-based-tracking.cpp:(.text+0xe22): undefined reference to `cv::String::allocate(unsigned long)'
feature-based-tracking.cpp:(.text+0xe45): undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'
feature-based-tracking.cpp:(.text+0xe52): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0xe79): undefined reference to `cv::VideoCapture::get(int) const'
feature-based-tracking.cpp:(.text+0xe93): undefined reference to `cv::VideoCapture::get(int) const'
feature-based-tracking.cpp:(.text+0xead): undefined reference to `cv::VideoCapture::get(int) const'
feature-based-tracking.cpp:(.text+0x1513): undefined reference to `cv::imread(cv::String const&, int)'
feature-based-tracking.cpp:(.text+0x1520): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x2d75): undefined reference to `cv::calcOpticalFlowPyrLK(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputOutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::Size_<int>, int, cv::TermCriteria, int, double)'
feature-based-tracking.cpp:(.text+0x3840): undefined reference to `cv::String::allocate(unsigned long)'
feature-based-tracking.cpp:(.text+0x385b): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
feature-based-tracking.cpp:(.text+0x3868): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x3a92): undefined reference to `cv::String::allocate(unsigned long)'
feature-based-tracking.cpp:(.text+0x3ab1): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
feature-based-tracking.cpp:(.text+0x3abe): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x4438): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x452a): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x48eb): undefined reference to `cv::String::deallocate()'
feature-based-tracking.cpp:(.text+0x4932): undefined reference to `cv::String::allocate(unsigned long)'
feature-based-tracking.cpp:(.text+0x49e5): undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
make: *** [feature-based-tracking] Error 1
chu@ubuntu :~/trafficintelligence/c$

加载中
0
d
daisiar
诚请高手指教呀
0
O
One_Star

我编译arm版本的,也出现这个问题,请问楼主解决了吗?

返回顶部
顶部