0

在构建项目后将库连接到 QT 时,出现以下错误:

util.obj:-1: error: LNK2019: unresolved external symbol umfpack_di_symbolic referenced in function "public: void __cdecl util::Get_Initial_Solution(double *,class Mesh &)" (?Get_Initial_Solution@util@@QEAAXPEANAEAVMesh@@@Z)

我尝试重建项目并确保我使用的库版本和编译器与 MSVC 2015 64 位兼容。我使用 QT creator 中的内置管理器从 VCPKG“UMFPACK”中引用库,如下所示:

QMAKE_LIBDIR += "C:/vcpkg-master/installed/x64-windows/lib"
win32:CONFIG(release, debug|release): LIBS += -L"C:/vcpkg-master/installed/x64-windows/lib/" -llibumfpack


INCLUDEPATH += "C:/vcpkg-master/installed/x64-windows/include/suitesparse"
DEPENDPATH += "C:/vcpkg-master/installed/x64-windows/include/suitesparse" 

这是引发错误的 get_initial_solution 函数(某些部分已从代码中删除,由三个点替换。只是为了简单起见。

void util::Get_Initial_Solution(double *Sol, Mesh &EHL)
{
.
.
.
 umfpack_di_symbolic(2*EHL.N_Nodes_2D,2*EHL.N_Nodes_2D,
                        Kee_colptr,Kee_rowind,Kee_nzval,&Symbolic, null,null);
    umfpack_di_numeric(Kee_colptr,Kee_rowind,Kee_nzval,Symbolic,&Numeric,null,null);
    umfpack_di_free_symbolic(&Symbolic);
    umfpack_di_solve(UMFPACK_A, Kee_colptr,Kee_rowind, Kee_nzval, x, rhs_hertz, Numeric, null, null);
    umfpack_di_free_numeric(&Numeric);
.
.
.
}

知道是什么导致了这个错误吗?先感谢您

4

0 回答 0