1 | initial version |
You should provide paths to OpenCV include and libraries directories to compiler. You can achieve this is by using cmake to build your application. See the example project: https://github.com/Itseez/opencv/tree/master/samples/cpp/example_cmake
Other method is even easier: since you are trying to build packaged example, you just need to enable BUILD_EXAMPLES
cmake option when building OpenCV library:
cmake -DBUILD_EXAMPLES=ON -DOPENCV_EXTRA_MODULES_PATH=<path-to-contrib>/modules <path-to-opencv>