Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason for the error "cannot open source file 'opencv2/opencv.hpp'" in C++ with VS code on Ubuntu could be because the compiler cannot find the OpenCV library files. This can happen if the OpenCV library is not properly installed or if the include paths are not set correctly. To fix this, ensure that OpenCV is installed properly and that the include paths are set correctly in the VS code project settings.