scalarMatrix
I am trying to convert an older mesh motion class from 1.5-dev to 2.0.x. The compiler gives me the following error:
Code:
RBFInterpolation.H:102: error: ISO C++ forbids declaration of ‘scalarMatrix’ with no type Code:
mutable scalarMatrix* BPtr_; |
The matrix class structures changed between 1.5 and 1.6 and caused me a bit of a headache. I don't remember the details, but you can look at the implementations of ODE solvers between the two versions to see what you need to change.
|
David,
Thank you for this tip. I tried to find files containing scalarMatrix, without succes. I looked in scalarMatrices.C and, as far as I understand, one has to chose between the subclasses. So I changed all scalarMatrix to scalarRectangularMatrix, which seems the most general subclass. Now, I have another error that I could not overcome: Code:
SOURCE=RBFMotionFunctionObject.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/dynamicMesh/lnInclude -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/triSurface/lnInclude -IlnInclude -I. -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/jmatthei/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/RBFMotionFunctionObject.o . |
I don't know much about the classes you are working with, but I've dealt with that error before. The compiler is complaining that you are trying to create an instance of pure virtual object. Pure virtual objects cannot be created... they only exist as a part of a logical class structure. You have to go down the class structure and find a suitable derived object. The only way you can tell if the class is "pure virtual" or not is: pure virtual objects are missing the implementation of at least one function. The compiler is telling you which function is missing: execute(). So either find another object that inherits RBFMotionFunctionObject, or implement execute() in this class yourself.
Share and enjoy! -Dave |
All times are GMT -4. The time now is 02:26. |