CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

compilation error: undefined reference to `non-virtual thunk

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2022, 08:39
Default Linker error: Undefined reference in shared library to `non-virtual thunk
  #1
New Member
 
Bhimesh Jetty
Join Date: Feb 2022
Posts: 5
Rep Power: 4
BJ_23 is on a distinguished road
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.

Last edited by BJ_23; April 22, 2022 at 12:01.
BJ_23 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] An Error in recompiling of openFoam-4.0 alimea OpenFOAM Installation 4 April 8, 2020 14:44
Sig Density Based Solver installation with FOAM Extend 3.2 qjh888 OpenFOAM Bugs 0 September 21, 2016 08:16
Simple piston movement in cylinder- fluid models arun1994 CFX 4 July 8, 2016 02:54
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34
Building OpenFoAm on SGI Altix 64bits anne OpenFOAM Installation 8 June 15, 2006 09:27


All times are GMT -4. The time now is 16:22.