I have a project which links to half a dozen libraries, among them OpenCV.
Since Release variant is crashing, while Debug is working fine (just a lot slower), I wanted to compile my project in RelWithDebInfo
configuration.
However, Debug
version of OpenCV libraries gets included instead of Release
(OpenCV doesn’t have RelWithDebInfo
variant). This causes linking errors such as:
opencv_core249d.lib(alloc.obj) : error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MDd_DynamicDebug’ doesn’t match value ‘MD_DynamicRelease’ in MyProject.obj
How to solve this problem?