OpenCV imread(filename) fails in debug mode when using release libraries

后端 未结 6 2113
逝去的感伤
逝去的感伤 2020-11-29 03:23

I have some C++ code and everything was working fine with OpenCV except the function imread(file). It was finding correctly th

6条回答
  •  -上瘾入骨i
    2020-11-29 04:09

    You can work around this issue by changing the runtime library of your Debug application from /MDd (multi-threaded DLL debug) to /MD (regular, release version of the multi-threaded DLL runtime).

    Your code will still be unoptimized and easier to debug than a normal release mode, but you will lose some debugging information (for example for crashes within the C runtime). You also lose some debugging features like the debug heap, but if you don't know what that is then it won't affect you.

    To do this work around, just go to Properties>C/C++/Code Generation and change "Runtime Library" from /MDd to /MD.

提交回复
热议问题