I use boost library and openCV with Visual Studio 2013 in windows 7.
When I build them, there are many errors like that.
opencv_core2410d.lib(alloc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in structure.obj
So, I search this error, and change Runtime Library of project's properties from /MDd to /MTd.
After that, These error is disappear. But, There are other errors like that.
libboost_system-vc120-mt-gd-1_57.lib(error_code.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in structure.obj
I built boost library like this before.
b2 toolset=msvc-12.0 variant=debug,release link=static threading=multi address-model=32 runtime-link=static
I build runtime-link static(/MTd) right. I don't know why I cannot compile boost with /MTd option. How can i do?
If you are using CMake you can add the following line to your CMakeLists.txt
so it becomes
After that you need to add your OpenCV dlls to the Path. For example:
After that it should work using /MDd.
I had the same problem when using OpenCV with Qt and this helped me getting started: https://github.com/nickdademo/qt-opencv-multithreaded