Program crash because of OpenCV
-
I'm trying to do some stuff with opencv for the first time, followed all steps from the official manual, program have no errors, compiles well, and it eventually crashes when i press "Run".
The line which cause this crash is simple, and it is the only OpenCV stuff in the code:
cv::Mat sourceIMG;
Here is part of my .pro file:
And this is includes, app output and deploy info:
Build environment which i added yesterday for includes, and now added .dlls for hope that it would help but it did'nt:
It is probably somthing wrong with opencv dll's, but i'm not sure, please help.
-
This topic helped, i checked my system variables and found that manual which i used for installing OpenCV mislead me, i added wrong folder(for x64 version) when i was aiming x32 OpenCV.
Changed System variable path for OpenCV dlls to "D:\Program Files\opencv\build\install\x86\vc15\bin" , now no crash, program works correctly.
-
@Engelard
Just because it compiles/links does not mean all is well, per se. Your line creates a runtime OpenCV object, any incompatibility could show up at that point. Not that I have the answer for you, but just saying....BTW, is that line a global/static variable, a member variable, or what? I know nothing about OpenCV, does it have a library initialization call you are supposed to make before creating any objects?
When i try(Ctrl+F5) it simply gives me message-box(error) "The CDB process terminated"
Have you tried a one-line, Hello World program, no Qt or OpenCV, just to check your compiler set up etc. is working OK?
-
@JonB said in Program crash because of OpenCV:
Have you tried a one-line, Hello World program, no Qt or OpenCV, just to check your compiler set up etc. is working OK?
As i said at the beginning, if i removing that exact line(cv::Mat sourceIMG;) - everything works well
-
This topic helped, i checked my system variables and found that manual which i used for installing OpenCV mislead me, i added wrong folder(for x64 version) when i was aiming x32 OpenCV.
Changed System variable path for OpenCV dlls to "D:\Program Files\opencv\build\install\x86\vc15\bin" , now no crash, program works correctly.