There are two parameters that must be consistent with each other:
(1) Project > Properties > General > Use of MFC (2) Project > Properties > C/C++ / Code Generation / Runtime Library
If (1) is set to Use MFC in static library , then (2) must be Multithreaded (/MT) or Multithreaded Debug (/MTd) (respectively in the Release and Debug assemblies). If (1) Use MFC in Shared DLL , then (2) must be Multi-threaded DLL (/MD) or Multi-threaded Debug DLL (/MDd) .
If they do not agree, you will receive the error message that you indicated.
source share