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

后端 未结 6 2142
逝去的感伤
逝去的感伤 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条回答
  •  臣服心动
    2020-11-29 04:25

    In general it is perfecly legal to link "Debug" executable configuration against "Release" configuration library (why should not be as far as the symbols exported by the libraries are the same in Debug and in Release?). Unless (for some reasons) you don't want that "mixing" happen. It turns out that opencv developers decided to not allow such mixing and they perform such probihibition with a specific portion of code (something you can find in the file cvdef.h on release 3.4.4 line 54). That is not a C++ interface bug, but a "wanted" behaviour. You can find more information at https://github.com/opencv/opencv/pull/9161 where this change has been documented.

提交回复
热议问题