I am trying to compile an execute a C++ program in Linux using OpenCV.
When I type
g++ -c facedetection.cpp -std=c++11 -o facedetection
facedetection file is correctly generated. Please note that I use
-std=c++11 because I had an error advising to do so.
chmod o+x facedetection I try to execute it with
./facedetection but I get error:
bash: ./facedetection: cannot execute binary file: Exec format error
What is wrong?