CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   compilation error: undefined reference to `non-virtual thunk (https://www.cfd-online.com/Forums/openfoam-programming-development/242076-compilation-error-undefined-reference-non-virtual-thunk.html)

BJ_23 April 4, 2022 08:39

Linker error: Undefined reference in shared library to `non-virtual thunk
 
Hello Foamers,

I'm trying to compile a multiphase solver by adapting the compressibleInterFoam solver in OpenFOAM 7. When I try to create my executable, I get the following error:

Code:

        -lm -o /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/bin/rimFoam
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libsolidThermo.so: undefined reference to `Foam::basicThermo::shearRate() const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::rhoThermo::mu(int) const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libsolidThermo.so: undefined reference to `Foam::basicThermo::cure()'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libsolidThermo.so: undefined reference to `Foam::basicThermo::cure() const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::fluidThermo::nu(int) const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libsolidThermo.so: undefined reference to `Foam::basicThermo::shearRate()'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::psiThermo::mu(int) const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::rhoThermo::mu() const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::fluidThermo::nu() const'
/usr/bin/ld.bfd: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined reference to `non-virtual thunk to Foam::psiThermo::mu() const'
collect2: error: ld returned 1 exit status
make: *** [/opt/openfoam7/wmake/makefiles/general:142: /home/vmopenfoam7/OpenFOAM/vmopenfoam7-7/platforms/linux64GccDPInt32Opt/bin/rimFoam] Error 1

My code in make->options file:

Code:

EXE_INC = \
    -I. \
    -I$(WM_PROJECT_USER_DIR)/applications/solvers/multiphase/VoF/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/applications/solvers/multiphase/rimFoam/surfaceTensionModels/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/applications/solvers/multiphase/rimFoam/twoPhaseMixtureThermo/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/applications/solvers/multiphase/rimFoam/VoFphaseCompressibleTurbulenceModels/lnInclude \
    -I$(LIB_SRC)/transportModels/compressible/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/thermochemicalModels/kineticModels/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
    -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/TurbulenceModels/turbulenceModels/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/TurbulenceModels/compressible/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/TurbulenceModels/phaseCompressible/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/dynamicMesh/lnInclude \
    -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -ltwoPhaseMixtureThermo \
    -ltwoPhaseSurfaceTension \
    -lcompressibleTransportModels \
    -lkineticModels \
    -lfluidThermophysicalModels \
    -lspecie \
    -ltwoPhaseMixture \
    -ltwoPhaseProperties \
    -linterfaceProperties \
    -lturbulenceModels \
    -lcompressibleTurbulenceModels \
    -lVoFphaseCompressibleTurbulenceModels \
    -lfiniteVolume \
    -lfvOptions \
    -lmeshTools \
    -ldynamicMesh \
    -ldynamicFvMesh

I would be glad to know if anyone has a solution to the error.

Thank you in advance.


All times are GMT -4. The time now is 15:06.