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

compile error when playing with OpenFOAM test cases

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2016, 13:13
Default compile error when playing with OpenFOAM test cases
  #1
New Member
 
Zheng Liu
Join Date: Oct 2016
Posts: 6
Rep Power: 9
TimLiu is on a distinguished road
Dear OpenFoam users,

I was just playing with some test cases in the OpenFOAM directory $WM_PROJECT_DIR/applications/test/mesh.

When I was trying to compile the Test-mesh.C file by typing wmake in the terminal. It gives me a lot of errors (see attached compile log). I am quite a new user of OpenFoam and I don't know how to solve this problem.

Can anyone help me ?

Many Thanks,
Zheng







/opt/openfoam4/applications/test/mesh
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam4/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c Test-mesh.C -o /opt/openfoam4/platforms/linux64GccDPInt32Opt/applications/test/mesh/Test-mesh.o
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37,
from Test-mesh.C:28:
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:81:1: error: template class without a name
class
^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37,
from Test-mesh.C:28:
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:30:55: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
Foam::GeometricField<Type, PatchField, GeoMesh>::null()
^
In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54,
from Test-mesh.C:27:
/opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
class GeometricField;
^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37,
from Test-mesh.C:28:
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:41:17: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
internalField() const
^
In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54,
from Test-mesh.C:27:
/opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
class GeometricField;
^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37,
from Test-mesh.C:28:
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:51:67: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
Foam::GeometricField<Type, PatchField, GeoMesh>:rimitiveField() const
^
In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54,
from Test-mesh.C:27:
/opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
class GeometricField;
^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37,
from Test-mesh.C:28:
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:60:66: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
Foam::GeometricField<Type, PatchField, GeoMesh>::boundaryField() const
^
In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54,
from Test-mesh.C:27:
/opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’
class GeometricField;
^



...

...

...




/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C: In instantiation of ‘Foam::Ostream& Foam:perator<<(Foam::Ostream&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]’:
Test-mesh.C:56:19: required from here
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C:1271:7: error: no match for call to ‘(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>) ()’
gf().writeData(os, "internalField");
^
/opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C:1273:5: error: invalid use of incomplete type ‘const class Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>’
gf.boundaryField().writeEntry("boundaryField", os);
^
In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54,
from Test-mesh.C:27:
/opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>’
class GeometricField;
^
make: *** [/opt/openfoam4/platforms/linux64GccDPInt32Opt/applications/test/mesh/Test-mesh.o] Error 1
TimLiu is offline   Reply With Quote

Old   November 14, 2016, 14:35
Default
  #2
New Member
 
Zheng Liu
Join Date: Oct 2016
Posts: 6
Rep Power: 9
TimLiu is on a distinguished road
I solved this problem by simply reinstall the OpenFOAM.
TimLiu is offline   Reply With Quote

Reply

Tags
compile error


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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
[OpenFOAM.org] Failed to compile OpenFOAM 3.0.1 with icc xuegy OpenFOAM Installation 1 July 13, 2016 16:03
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Free OpenFOAM CHT Report and Cases (No Catch!) m.nichols19 OpenFOAM 6 August 23, 2010 21:40


All times are GMT -4. The time now is 20:04.