To change the MFC library version, you need to edit the linker list of libraries. Change NAFXCWD.LIB to MFCxxD.LIB and change NAFXCW.LIB to MFCxx.LIB. Replace LIBC.LIB with MSVCRT.LIB. As with any other MFC library, it's important that MFCxxD.LIB is placed before any C-runtime libraries. If you're using the internal makefile with most of the standard defaults, you can easily change the project to build the DLL version. On the Projects menu, select Properties. In the General page under Project Defaults, set Microsoft Foundation Classes to Use MFC in a Shared DLL (MFCxx(d).dll). If you're using the external makefile feature of the compiler, or are using NMAKE directly, you'll have to edit your makefile to support required compiler and linker options. Required compiler flags: /D_AFXDLL /MD. The standard MFC headers need the _AFXDLL symbol to be defined. /MD. The application must use the DLL version of the C run-time library. All other compiler flags follow the MFC defaults (for example, _DEBUG for debug).
References: