CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   something wrong when I compile swak4Foam (http://www.cfd-online.com/Forums/openfoam/118173-something-wrong-when-i-compile-swak4foam.html)

whyingwang May 22, 2013 05:21

something wrong when I compile swak4Foam
 
Recently I try to compile swak4Foam.But I failed.
I use OpenFOAM-2.1.1 and bison:2.4.1,flex 2.5.35.
It tells me something wrong with the function,as show below:

PatchValueExpressionParser.yy:476: error: no matching function for call to ‘Foam::Field<Foam::SymmTensor<double> >::Field(Foam::tmp<Foam::Field<Foam::Tensor<double > > >)’
............
PatchValueExpressionParser.yy:666: error: no matching function for call to ‘Foam::Field<Foam::SymmTensor<double> >::Field(Foam::tmp<Foam::Field<Foam::Tensor<double > > >)’
............
swakCodedFunctionObject.C:292: error: no matching function for call to ‘Foam::swakCodedFunctionObject::updateLibrary()’
...........
groovyFlowRateInletVelocityFvPatchVectorField.C:12 4: error: ‘flowRate’ was not declared in this scope

Who can tell me why?I compiled successfully on OpenFOAM-2.1.0 but fail on OpenFOAM-2.2.0

gschaider May 22, 2013 07:13

Quote:

Originally Posted by whyingwang (Post 429141)
Recently I try to compile swak4Foam.But I failed.
I use OpenFOAM-2.1.1 and bison:2.4.1,flex 2.5.35.
It tells me something wrong with the function,as show below:

PatchValueExpressionParser.yy:476: error: no matching function for call to ‘Foam::Field<Foam::SymmTensor<double> >::Field(Foam::tmp<Foam::Field<Foam::Tensor<double > > >)’
............
PatchValueExpressionParser.yy:666: error: no matching function for call to ‘Foam::Field<Foam::SymmTensor<double> >::Field(Foam::tmp<Foam::Field<Foam::Tensor<double > > >)’
............
swakCodedFunctionObject.C:292: error: no matching function for call to ‘Foam::swakCodedFunctionObject::updateLibrary()’
...........
groovyFlowRateInletVelocityFvPatchVectorField.C:12 4: error: ‘flowRate’ was not declared in this scope

Who can tell me why?I compiled successfully on OpenFOAM-2.1.0 but fail on OpenFOAM-2.2.0

The problem is that the API changes between versions of OpenFOAM (sometimes even in the same version). swak tries to determine your version and does things slightly different depending on the version.

Anyway: which version of swak do you have? Older versions than 0.2.3 will not compile on OF 2.2 (and for 2.2.0 you need a manual fix ... see the page on the Wiki). Ah. And which variant of the sources do you have? The 1.x or the 2.x-version?


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