-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined reference in Camera_timer.cpp #12
Comments
Resolved first issue by putting ${OpenCV_LIBRARIES} before ${catkin_LIBRARIES}. Errors << chapter9_tutorials:make /home/osean/dev/catkin_ws/logs/chapter9_tutorials/build.make.037.log Vector is included in header and non-free uses it's namespace. I'm not sure what linker is causing this error. I've remade OpenCV 2.4.9 on my system and same issue. |
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
The text was updated successfully, but these errors were encountered: