#error Please use the /MD switch for _AFXDLL builds

Settings for CRT linking and MFC linking must be coherent. So, actually, there are two possible answers at this question:

  1. Use /MT (Properties -> C/C++ -> Code Generation) and static MFC (Properties -> General -> Use of MFC)

  2. Use /MD (Properties -> C/C++ -> Code Generation) and shared MFC (Properties -> General -> Use of MFC)

Leave a Comment