求解器编译问题“对‘XXX const’未定义的引用”
-
在2.3中编译求解器,报如下错误,感觉连接问题,但是Options中已将将所有引用的头文件都包含进去了,kOmegaMHD湍流模型我已经编译到RAS源库当中了,引用湍流模型也在H文档下添加了
报错如下:/home/kdd/OpenFOAM/OpenFOAM 2.3.1/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so:对 'Foam::incompressible::RASModels::kOmegaMHD::divDevRhoReff(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const' collect2: error: ld returned 1 exit status /home/kdd/OpenFOAM/OpenFOAM-2.3.1/wmake/Makefile:149: recipe for target '/home/kdd/OpenFOAM/kdd-2.3.1/platforms/linux64GccDPOpt/bin/MHDRASpisoFoam' failed
Options中引用的头文件如下
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/sampling/lnInclude\ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude\ EXE_LIBS = \ -lincompressibleLESModels \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lfiniteVolume \ -ltriSurface \ -lmeshTools
files
MHDRASpisoFoam.C EXE = $(FOAM_USER_APPBIN)/MHDRASpisoFoam
在.H文档结尾处也添加了模型引用,如下
singlePhaseTransportModel laminarTransport(U, phi); autoPtr<incompressible::turbulenceModel> turbulence ( incompressible::turbulenceModel::New(U, phi, laminarTransport) );
在查找资料时找到类似的编程错误,类似错误,以及之前有提过的类似错误
希望各位前辈和好友能指点一二,,,