Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you are not supposed to execute any cpp file, you have to compile & link it first.

if you did run make install as the last opencv installation step, you would run a cmdline like

g++ opencv_version.cpp -lopencv_core -o opencv_version

to make an executable binary from your cpp source code, and then run the latter:

./opencv_version

you are not supposed to execute any cpp file, you have to compile & link it first.

if you did run make install as the last opencv installation step, you would run a cmdline like

g++ opencv_version.cpp -I /usr/local/include/opencv4 -lopencv_core -o opencv_version

to make an executable binary from your cpp source code, and then run the latter:

./opencv_version

please also look at the cmake example here (as a template to build your own, more complex programs)