Skip to content

Undefined reference in Camera_timer.cpp #12

@ghost

Description

When compiling by following instructions on Readme with "catkin build -j4 -p4 --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo"

/home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:49: undefined reference to cv::VideoCapture::operator>>(cv::Mat&)' CMakeFiles/camera_timer.dir/src/camera_timer.cpp.o: In function CameraDriver::CameraDriver(int)':
/home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:21: undefined reference to cv::VideoCapture::VideoCapture(int)' /home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:24: undefined reference to cv::VideoCapture::isOpened() const'
/home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:21: undefined reference to cv::VideoCapture::~VideoCapture()' CMakeFiles/camera_timer.dir/src/camera_timer.cpp.o: In function CameraDriver::~CameraDriver()':
/home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:44: undefined reference to cv::VideoCapture::release()' /home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:43: undefined reference to cv::VideoCapture::~VideoCapture()'
/home/osean/dev/catkin_ws/src/ros_book/chapter9_tutorials/src/camera_timer.cpp:43: undefined reference to `cv::VideoCapture::~VideoCapture()'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/osean/dev/catkin_ws/devel/.private/chapter9_tutorials/lib/chapter9_tutorials/camera_timer] Error 1
make[1]: *** [CMakeFiles/camera_timer.dir/all] Error 2
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions