Well - this is not in the strictest sense an OpenCV question - but it concerns the examples of OpenCV and how to compile them.
I want to compile the example at
https://docs.opencv.org/3.4.15/d1/dc5/tutorial_background_subtraction.html
but I am struggling.
I tried g++ -std=c++11 -I /usr/local/Cellar/opencv/4.5.3_2/include/opencv4/ bg_sub.cpp
but it failed with “Undefined symbols for architecture x86_64”.
I am on an Intel Mac, running Catalena and OpenCV installed using home-brew.
Any ideas?