I have successfully installed OpenCV 2.3.1 on Raspbian image and I would like to build/run some of the C/C++ programs located under the ~/OpenCV-2.3.1/samples directory.
For example, if I wanted to create an executable for ~/OpenCV-2.3.1/samples/cpp/kmeans.cpp how do I do this?
If I do g++ kmeans.cpp I get a whole bunch of compiler errors saying "undefined reference" to OpenCV functions. So obviously I need to pass it in libraries, but I'm not sure how?