error C2065: 'CString' : undeclared identifier错误的处理方法

在调试c++程序时,出现错误提示:
1.error C2065: 'CString' : undeclared identifier或
2.nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
处理办法:
1.检查是否包含头文件afx.h
2.打开project->settings->general->microsoft foundation classes->
选use MFC in a static library
或选 use MFC in a shared DLL(需要把MFC的动态库放在system32文件夹下) .

#include <afx.h>//CString结构的头文件afx.h

原文地址:https://www.cnblogs.com/test-myblog/p/3513289.html