8>WellInfoSheet.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall CWellInfWPage::CWellInfWPage(class GeoWell *)"
(??0CWellInfWPage@@QAE@PAVGeoWell@@@Z),该符号在函数 "public: __thiscall CWellInfoSheet::CWellInfoSheet(class GeoWell *)"
(??0CWellInfoSheet@@QAE@PAVGeoWell@@@Z) 中被引用
8>WellInfoSheet.obj : error LNK2019: 无法解析的外部符号 "public: int __thiscall CWellInfWPage::OnApply(class GeoWell *)" (?OnApply@CWellInfWPage@@QAEHPAVGeoWell@@@Z),该符号在函数 "public: virtual int __thiscall CWellInfoSheet::OnCommand(unsigned int,long)" (?OnCommand@CWellInfoSheet@@UAEHIJ@Z) 中被引用
8>..\..\bin.debug\GeoSolution.exe : fatal error LNK1120: 2 个无法解析的外部命令
说明:本次出现这样的错误,通过查找原因,锁定了是因为没有包含类的源文件CWellInfWPage,因此需要在工程中右击,选择添加,现有项,选择相关的CWellInfWPage.cpp文件添加,然后编译,解决问题。
另外,出现该原因还有可能是调用了外部函数,比如是DLL中的函数,而没有将函数或类导出 将相应函数或类声明时变为
class AFX_EXT_CLASS className 即可。