Reputation: 59
I just started using opencv 2.4.0. So after installing, I tried to copy a sample code from here to my project. So click on F5 then a cmd screen opens then closes immediately. I tried googling but didnt find a solution. What am I doing wrong?
Upvotes: 0
Views: 292
Reputation: 7470
Go cmd, and go exe's directory, but before find a video file, copy it to that working directory too.
cd WhereYourApplicationExe
yourapplication.exe avideofile.wmv avideofile.wmv 10 1
Upvotes: 1
Reputation: 69372
Since it's a console application, you can either add
cin.get();
return 0;
in your Main
block. This ensures that the prompt window will wait for user input before closing as, at the moment, the code is executed and the command prompt window is closed upon completion.
Alternatively, if you don't need the debugger, you can press CTRL + F5 to run it.
Upvotes: 1