error LNK1120 ++ error LNK2019

错误提示:

错误 25 error LNK1120: 3 个无法解析的外部命令 D:ACodeFCSFCSWin32Release\FCS.exe FCS

错误 22 error LNK2019: 无法解析的外部符号 "public: __thiscall BllMath::BllMath(class QObject *)" (??0BllMath@@QAE@PAVQObject@@@Z),该符号在函数 "public: void __thiscall CompensationSettings::getMatrixFromUi(float *,int,class QList<double> &)" (?getMatrixFromUi@CompensationSettings@@QAEXPAMHAAV?$QList@N@@@Z) 中被引用 D:ACodeFCSFCSFCSCompensationSettings.obj FCS

错误 24 error LNK2019: 无法解析的外部符号 "public: bool __thiscall BllMath::gauss(float (* const)[10],float (* const)[10],int)" (?gauss@BllMath@@QAE_NQAY09M0H@Z),该符号在函数 "public: void __thiscall CompensationSettings::getMatrixFromUi(float *,int,class QList<double> &)" (?getMatrixFromUi@CompensationSettings@@QAEXPAMHAAV?$QList@N@@@Z) 中被引用 D:ACodeFCSFCSFCSCompensationSettings.obj FCS

错误 23 error LNK2019: 无法解析的外部符号 "public: virtual __thiscall BllMath::~BllMath(void)" (??1BllMath@@UAE@XZ),该符号在函数 "public: void __thiscall CompensationSettings::getMatrixFromUi(float *,int,class QList<double> &)" (?getMatrixFromUi@CompensationSettings@@QAEXPAMHAAV?$QList@N@@@Z) 中被引用 D:ACodeFCSFCSFCSCompensationSettings.obj FCS

原因分析:

error LNK1120是error LNK2019的汇总,究其原因,BllMath类没有解析成功。

解决方案:

1.将BllMath所在路径添加到c++ include目录中;

2.检查BllMath所在文件是否加载成功。

 

原文地址:https://www.cnblogs.com/oakentree/p/5905425.html