undefined reference to Foam::PointPatchField

在 foam-extend-3.1 上依次编译库 tetDecompositionFiniteElement、tetDecompositionMotionSolver、dynamicFvMesh 成功后,将其连接到求解器时,出现 undefined reference 问题。

tetDecompositionFiniteElement、tetDecompositionMotionSolver 来自于 ext-1.6 版本。

$ wmake
SOURCE=fsiFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I../../fluidStructureInteraction/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/finiteVolume/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/dynamicMesh/dynamicFvMesh/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/finiteArea/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/lagrangian/basic/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/meshTools/lnInclude     -DCELL_DECOMP     -I/home/cfd/foam/foam-extend-3.1/src/dynamicMesh/meshMotion/tetDecompositionMotionSolver/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/solidModels/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/tetFiniteElement/lnInclude -IlnInclude -I. -I/home/cfd/foam/foam-extend-3.1/src/foam/lnInclude -I/home/cfd/foam/foam-extend-3.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fsiFoam.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I../../fluidStructureInteraction/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/finiteVolume/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/dynamicMesh/dynamicFvMesh/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/finiteArea/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/lagrangian/basic/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/meshTools/lnInclude     -DCELL_DECOMP     -I/home/cfd/foam/foam-extend-3.1/src/dynamicMesh/meshMotion/tetDecompositionMotionSolver/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/solidModels/lnInclude     -I/home/cfd/foam/foam-extend-3.1/src/tetFiniteElement/lnInclude -IlnInclude -I. -I/home/cfd/foam/foam-extend-3.1/src/foam/lnInclude -I/home/cfd/foam/foam-extend-3.1/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/fsiFoam.o -L/home/cfd/foam/foam-extend-3.1/lib/linux64GccDPOpt \
     -lmeshTools     -L/home/cfd/foam/cfd-3.1/lib/linux64GccDPOpt     -lfluidStructureInteractionBearing     -lfiniteVolume     -lincompressibleTurbulenceModel     -lincompressibleRASModels     -lincompressibleLESModels     -lincompressibleTransportModelsBearing     -ldynamicFvMeshDecomp     -ldynamicMesh     -ltopoChangerFvMesh     -lsolidModels -lfoam -liberty -ldl   -lrt -lm -o /home/cfd/foam/cfd-3.1/applications/bin/linux64GccDPOpt/fsiFoamBearing
/home/cfd/foam/foam-extend-3.1/lib/linux64GccDPOpt/libcellDecompFiniteElement.so: undefined reference to `Foam::PointPatchField<Foam::tetPolyPatchField, Foam::tetPointMesh, Foam::tetPolyPatchCellDecomp, Foam::tetFemMatrix, Foam::SymmTensor4thOrder<double> >::typeName'
/home/cfd/foam/foam-extend-3.1/lib/linux64GccDPOpt/libcellDecompFiniteElement.so: undefined reference to `Foam::PointPatchField<Foam::tetPolyPatchField, Foam::tetPointMesh, Foam::tetPolyPatchCellDecomp, Foam::tetFemMatrix, Foam::SymmTensor4thOrder<double> >::PointPatchConstructorTablePtr_'
/home/cfd/foam/foam-extend-3.1/lib/linux64GccDPOpt/libcellDecompFiniteElement.so: undefined reference to `Foam::PointPatchField<Foam::elementPatchField, Foam::elementMesh, Foam::tetPolyPatchCellDecomp, Foam::DummyMatrix, Foam::SymmTensor4thOrder<double> >::dictionaryConstructorTablePtr_'
/home/cfd/foam/foam-extend-3.1/lib/linux64GccDPOpt/libcellDecompFiniteElement.so: undefined reference to `Foam::PointPatchField<Foam::tetPolyPatchField, Foam::tetPointMesh, Foam::tetPolyPatchCellDecomp, Foam::tetFemMatrix, Foam::DiagTensor<double> >::dictionaryConstructorTablePtr_'
...