>MFC.obj : error LNK2001: unresolved external symbol "class CWinApp theApp" (?theApp@@3VCWinApp@@A)
1>F:\test\itk_test\bin\Project1\MFC\Debug\MFC.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://f:\test\itk_test\bin\Project1\MFC\MFC\Debug\BuildLog.htm"
1>F:\test\itk_test\bin\Project1\MFC\Debug\MFC.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://f:\test\itk_test\bin\Project1\MFC\MFC\Debug\BuildLog.htm"
或者
#include "./XX.h"
这个变量并没有在 h 文件中声明,其他的CPP文件要用该变量.
就要加上 extern CWinApp theApp;
这样告诉编译器,该变量在其他源文件中,就行了.