Step 1:
Add the following:
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
#include afxwin.h
#ifndef _AFX_NO_OLE_SUPPORT
#include afxdisp.h // MFC Automation classes
#endif // _AFX_NO_OLE_SUPPORT
This block should be added before #define _ATL_ALL_WARNINGS
Step 2:
In Configuration properties -> General -> Projects Defaults -> Use of MFC, Select "Use MFC in a Shared DLL"
Step 3:
In the Configuration properties -> C/C++ ->Preprocessor Options section of the Compiler Settings if you are using _USRDLL and _AFXDLL together, try to remove _USRDLL and rebuild again.

No comments:
Post a Comment