Unable to run OpenCV code template in codeblocks

asked 2017-07-26 14:16:57 -0600

OS - Ubuntu 16.04LTS 64b
IDE - Code::Blocks 16.01 64b rev 10760
OpenCV - 3.2.0

I have recently compiled opencv and am trying to make it work in C::B. I am trying to run a template opencv code, which I arrived at by creating a new opencv project in C::B. It builds correctly. However, when I try to run, it terminates with status 255.

On other forums, such as this, people suggest installing xterm to make it work. I already have xterm installed and yet I am getting this error.

I have also tried all the possible options in the drop down accessible from Settings -> Environment -> Terminal to launch console programs.

Steps to reproduce:
1. Open C::B -> New Project -> OpenCV
2. Select appropriate location
3. Follow this tutorial to setup opencv with C::B
4. Build and run main.cpp

Thanks in anticipation!

edit retag flag offensive close merge delete

Comments

To the person(s) who downvoted, I request you to kindly share your reasons for the downvote so I can improve my question. I may be overlooking something very trivial, but I am simply not able to run it. P.S. I am very new to OpenCV

Thank You!

abhinavmathur96 gravatar imageabhinavmathur96 ( 2017-07-27 09:40:24 -0600 )edit

this is not at all an opencv problem, and yes, my downvote

berak gravatar imageberak ( 2017-07-28 06:20:16 -0600 )edit

oh, wait -- what about your code ? can it simply be, there's a return -1; in it somewhere ?

berak gravatar imageberak ( 2017-07-28 06:24:24 -0600 )edit