0

I want to use opencv 3.3.1 as a static library but with /MD flag with my dll project. I'm using visual studio 2015 on windows 7 and using "cmake" GUI to generate and configure. From "cmake" GUI I unchecked the shared library flag. From the visual studio I changed all the /MT option of all the "opencv" modules to /MD manually. After I installed the "opencv" libraries and link to it in my "dll" project I got this error: "mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value MD_DynamicRelease" Any help please.. Thanks in advance.

  • Possible duplicate of [OpenCV as a static library (cmake options)](https://stackoverflow.com/questions/7583172/opencv-as-a-static-library-cmake-options) – usr1234567 Dec 31 '17 at 12:22
  • you have to change the /MT flag within CMake parameters, because Visual Studio will recognize the change and re-create the project by CMake – Micka Dec 31 '17 at 15:50

0 Answers0