OpenCV Troubleshooting - olinrobotics/avatar GitHub Wiki
Undefined reference to `cv::VideoCapture::VideoCapture(int)'
- Video capture moved to videoio (ref)
- include videoio: try adding
include <opencv2/videoio.hpp>
- linking error (ref, ref)
- Solution: link openCV in Cmake, (documentation, stack overflow)
- ex/
set(OpenCV_DIR "/usr/lib/opencv")
find_package(OpenCV REQUIRED COMPONENTS core imgproc highgui)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
Last edited by Sophia Nielsen 7/10/2017