issue with setting /MT flag while building

asked 2016-04-27 07:56:13 -0500

Etfcan gravatar image

I am having problems while building OpenCV with /MT flags using Intel Compiler for Windows.

OpenCV version: 3.1 Host OS: Windows 7 Compiler: Intel Compiler

In which part of the OpenCV library you got the issue? Building OpenCV

Expected behaviour: To be able to build with /MT flag

Actual behaviour: the /nodefaultlib:libcmt.lib causes my links to fail with unresolved C runtime symbols

If I remove the /nodefault:libcmt.lib flags from the CMakeLists.txt files, then my build is successful. Why is this flag present, and can it be removed to allow static-runtime builds without requiring modifications?

edit retag flag offensive close merge delete