关于调用 库函数的报错
-
将湍流模型和求解器成功编译到自己的库中,然后在算例system/controlDict中加入如下命令进行调用,如下:
libs ("libkOmegaMHD.so");
但是运行算例会报如下错误,显示未定义的符号,以及后面divDevRhoReff这个可压缩函数,和GeometricField、fvPatchField、volMesh、Vector这几个,并无法加载调用湍流模型,关键是湍流模型已经已经编译通过了,,,
Create time--> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : /home/kdd/OpenFOAM/kdd-2.3.1/platforms/linux64GccDPOpt/lib/libkOmegaMHD.so: undefined symbol: _ZNK4Foam14incompressible9RASModels9kOmegaMHD13divDevRhoReffERKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERNS3_INS_6VectorIdEES4_S5_EE --> FOAM Warning : From function dlLibraryTable::open(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libkOmegaMHD.so" Create mesh for time = 0