Check out example codes for "undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'". It will help you in understanding the concepts better.

Code Example 1

[email protected]:~/test$ g++ open_videofile.cpp  `pkg-config --cflags --libs opencv` 


Explanation:
need to compile opencv programs with `pkg-config --cflags --libs opencv` . 
it solve below undefined reference errors:

undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'

Learn ReactJs, React Native from akashmittal.com