1

I have compiled a cpp program, but now I cannot run it. The error message I get says command not found.

I compiled it by running this command:

gcc `pkg-config --cflags opencv` OpenCV_ViolaJones.cpp -o OpenCV_ViolaJones `pkg-config --libs opencv`

It's compiled successfully. However, when I run it:

./OpenCV_ViolaJones

It shows me "Command not found". I am pretty sure that I am in the same directory and using the correct name.

Could you explain this to me, please? Thank you very much!

Zanna
  • 72,312
Fei
  • 19

1 Answers1

-1

You need to make it executable before being able to run it like that:

chmod +x OpenCV_ViolaJoanes

will make your compiled program executable and you will be then able to run it.

Bruno Pereira
  • 74,715