Can not resolve "undefined reference"
Hey all,
I am building my own mixed bc. I started my BC on a fixedGradient BC (turbulentHeatFluxTemperature) but the problem is that I need to call the updateCoeffs from the mixedFvPatchField:
Code:
mixedFvPatchScalarField::updateCoeffs();
instead of the fixedGradient:
Code:
fixedGradientFvPatchScalarField::updateCoeffs();
Doing this, I changed the derivation from
Code:
public fixedGradientFvPatchScalarField
{
to
Code:
public mixedFvPatchScalarField
{
And of course I changed all necessary stuff in the file. The problem that I have now is the undefined references of vtable during compilation:
Code:
shorty@myTemperatureLaplacianFoam: wmake
Making dependency list for source file myTemperatureLaplacianFoam.C
SOURCE=myTemperatureLaplacianFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/radiationModels/lnInclude -IaserBC/lnInclude -IlnInclude -I. -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myTemperatureLaplacianFoam.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/radiationModels/lnInclude -IaserBC/lnInclude -IlnInclude -I. -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o Make/linux64GccDPOpt/myTemperatureLaplacianFoam.o -L/home/shorty/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lOpenFOAM -ldl -lm -o /home/shorty/OpenFOAM/shorty-2.3.1/platforms/linux64GccDPOpt/bin/myTemperatureLaplacianFoam
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&, Foam::DimensionedField<double, Foam::volMesh> const&)':
laserMixedFvPatchScalarField.C:(.text+0x67e): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField'
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&)':
laserMixedFvPatchScalarField.C:(.text+0xb5f): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField'
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&)':
laserMixedFvPatchScalarField.C:(.text+0xde1): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField'
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)':
laserMixedFvPatchScalarField.C:(.text+0x1761): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField'
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&)':
laserMixedFvPatchScalarField.C:(.text+0x1934): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField'
Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::fvPatchField<double>::addpatchMapperConstructorToTable<Foam::laserMixedFvPatchScalarField>::New(Foam::fvPatchField<double> const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)':
laserMixedFvPatchScalarField.C:(.text._ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_28laserMixedFvPatchScalarFieldEE3NewERKS1_RKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_18fvPatchFieldMapperE[_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_28laserMixedFvPatchScalarFieldEE3NewERKS1_RKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_18fvPatchFieldMapperE]+0x22): undefined reference to `typeinfo for Foam::laserMixedFvPatchScalarField'
collect2: error: ld returned 1 exit status
The BC is in my own solver and is compiled with the solver using wmake.
All hints are appreciated.
|