Closed songbaiyao closed 3 years ago
Reproducing the error message with OpenFOAM 5.x and gcc version 7.5.0 gave following error message:
In file included from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/List.H:309:0,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/HashTable.C:30,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/Istream.H:184,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/ISstream.H:39,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/IOstreams.H:38,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/VectorSpace.C:27,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/VectorSpace.H:229,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/Vector.H:44,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/vector.H:39,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude/volFieldsFwd.H:37,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:39,
from /home/sy/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude/linear.H:38,
from WENOBase/WENOBase.H:42,
from WENOBase/WENOBase.C:31:
/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/List.C: In instantiation of ‘Foam::List<T>::List(InputIterator, InputIterator) [with InputIterator = int; T = long int]’:
WENOBase/WENOBase.C:1091:28: required from here
/home/sy/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/List.C:211:39: error: no matching function for call to ‘distance(int&, int&)’
List<T>(first, last, std::distance(first, last))
This is resolved by not initializing the labelList dummyList in WENOBase::setDegreeOfFreedom()
Platform: OpenFOAM 5.x/v1912 g++/gcc version: 7.5
I found the following errors in compiling the code: