OpenCV-MinGW-Build icon indicating copy to clipboard operation
OpenCV-MinGW-Build copied to clipboard

crash when calling in program

Open Sutter099 opened this issue 10 months ago • 0 comments

I have tried some versions like 3.4.9 and 4.1.1. Things work well with opencv objects like:

// cv_test.cpp main()
Point3d all_points[][2] = {
		Point3d( 0.0, 0.0, 0.0 ),
		Point3d( 1.0, 0.0, 0.0 ),

		Point3d( 0.0, 2.0, 0.0 ),
		Point3d( 1.0, 1.0, 0.0 ),
				 
		Point3d( 0.0, -2.0, 0.0 ),
		Point3d( 1.0, -1.0, 0.0 ),
	};

cv::Mat tmp = cv::Mat::zeros(512, 512, CV_8UC1);

However, when it comes to imread() and imshow(), I can still compile my program successfully, but running the exe, it crashes immediately. I guess it is about the dynamic link library...

// cv_test.cpp main()
    cv::Mat my_pic = cv::imread("./my_pic.png", cv::IMREAD_GRAYSCALE);
    cv::imshow("my_pic", my_pic);

// gdb output
(gdb) start
During startup program exited with code 0xc0000135

Sutter099 avatar Aug 16 '23 03:08 Sutter099