How do i solve this undefined reference? using opencv code for object recognition via colour to use in rviz [closed]
I'm new to Ubuntu so i'm not sure on how to some various problems. Please advise me thanks.
####
#### Running command: "make cmake_check_build_system" in "/home/chiongsterx/catkin_ws/build"
####
####
#### Running command: "make -j1 -l1" in "/home/chiongsterx/catkin_ws/build"
####
Linking CXX executable /home/chiongsterx/catkin_ws/devel/lib/vision/vision1
CMakeFiles/vision1.dir/src/vision.cpp.o: In function `main':
vision.cpp:(.text+0x4c): undefined reference to `cv::VideoCapture::VideoCapture(int)'
vision.cpp:(.text+0x5a): undefined reference to `cv::VideoCapture::isOpened() const'
vision.cpp:(.text+0xc7): undefined reference to `cv::namedWindow(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
vision.cpp:(.text+0x132): undefined reference to `cvCreateTrackbar'
vision.cpp:(.text+0x15d): undefined reference to `cvCreateTrackbar'
vision.cpp:(.text+0x188): undefined reference to `cvCreateTrackbar'
vision.cpp:(.text+0x1b3): undefined reference to `cvCreateTrackbar'
vision.cpp:(.text+0x1de): undefined reference to `cvCreateTrackbar'
CMakeFiles/vision1.dir/src/vision.cpp.o:vision.cpp:(.text+0x209): more undefined references to `cvCreateTrackbar' follow
CMakeFiles/vision1.dir/src/vision.cpp.o: In function `main':
vision.cpp:(.text+0x232): undefined reference to `cv::VideoCapture::read(cv::Mat&)'
vision.cpp:(.text+0x294): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
vision.cpp:(.text+0x2ac): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x2d4): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
vision.cpp:(.text+0x2fa): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
vision.cpp:(.text+0x3e0): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x40c): undefined reference to `cv::inRange(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&)'
vision.cpp:(.text+0x49e): undefined reference to `cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
vision.cpp:(.text+0x4b9): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x4d1): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
vision.cpp:(.text+0x4e9): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x52c): undefined reference to `cv::erode(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
vision.cpp:(.text+0x5c0): undefined reference to `cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
vision.cpp:(.text+0x5db): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x5f3): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
vision.cpp:(.text+0x60b): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x64e): undefined reference to `cv::dilate(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Point_<int>, int, int, cv::Scalar_<double> const&)'
vision.cpp:(.text+0x6e2): undefined reference to `cv::getStructuringElement(int, cv::Size_<int>, cv::Point_<int>)'
vision.cpp:(.text+0x6fd): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x715): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
vision.cpp:(.text+0x72d): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
vision.cpp:(.text+0x770): undefined reference to `cv::dilate(cv::_InputArray const&, cv::_OutputArray const&, cv ...