Running C++ executable located in visual studio project from cmd

Sean Costello 1 Reputation point
2021-07-10T06:44:45.18+00:00

I am trying to run a C++ executable from the command line as an easy way to run some C++ code with no I/O from python. When I run the executable file I get this error:

OpenCV(4.1.2) Error: Assertion failed (dims <= 2 && step[0] > 0) in cv::Mat::locateROI, file C:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\matrix.cpp, line 757 OpenCV: terminate handler is called! The last OpenCV error is: OpenCV(4.1.2) Error: Assertion failed (dims <= 2 && step[0] > 0) in cv::Mat::locateROI, file C:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\matrix.cpp, line 757

I don't receive any errors when running the code in Visual Studio debugger. I also checked to make sure the executable was updated after I rebuilt the project.

I notice the issues mention OpenCV. I followed these instructions to add OpenCV to the project: https://subwaymatch.medium.com/opencv-410-with-vs-2019-3d0bc0c81d96

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rupesh shukla 16 Reputation points
    2021-07-14T20:41:35.41+00:00

    Why not simply debug it with command line argument itself and make sure that you are using proper input parameter.

    Thanks

    0 comments No comments