I have a code which was implemented in older ITK version. Now its not possible to build it with new itk and vtk version. So I was trying to build an older ITK/VTK version with the latest cmake. but i could configure and generate itk/vtk. Is it necessary to match ITK/VTK version with cmake version?
Your best option is to update the code to use newer ITK, VTK, CMake, and C++ compiler because you will also likely need an older compiler (which may not be available).
i can see that some header files are not found with new ITK. what to do in that case.
Search in the ITK source tree for these headers and also the ITKv4 migration guide.
I tried to solve a lot. Still getting error with these.
solveQuadratic not a member of vtkmath
solveCubic not a member of vtkmath
: ‘Delete’ : is not a member of ‘vtkPowerCrustSurfaceReconstruction’
‘SetInputData’ : is not a member of ‘vtkPowerCrustSurfaceReconstruction’
GetClassNameA’ : is not a member of 'vtkPowerCrustSurfaceReconstruction
HasObserver’ : is not a member of ‘vtkPowerCrustSurfaceReconstruction’
‘InvokeEvent’ : is not a member of ‘vtkPowerCrustSurfaceReconstruction’
GetInput’ : is not a member of ‘vtkPowerCrustSurfaceReconstruction’
GetOutput’ : is not a member of 'vtkPowerCrustSurfaceReconstruction
please help @matt.mccormick
These errors indicate a missing header include or that the class API needs to be updated.
Are you using Power rust in you app? If not, you can turn it off in your cmake file.
That is the problem. In this program there is no cmake. I have to add the ITK header files in the include directory.
@matt.mccormick I can see that in the recent vtkPowerCrustSurfaceReconstruction.cxx and vtkPowerCrustSurfaceReconstruction.h files something is changed from my same file. Should I replace ?
I am getting one last error.
e:\itk\source\modules\thirdparty\vnl\src\vxl\core\vnl\vnl_numeric_traits.h(30): fatal error C1083: Cannot open include file: ‘vxl_config.h’: No such file or directory
But when i add the path of ‘vxl_config.h’ which is in the bin directory (because this file does not exist in source of ITK) i get a lot of error. this kind of…which is all are syntax error…
e:\itk\source\modules\core\common\include\itkcovariantvector.h(190): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1> e:\itk\source\modules\core\common\include\itkcovariantvector.h(241) : see reference to class template instantiation ‘itk::CovariantVector<T,NVectorDimension>’ being compiled
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(190): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(258): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(258): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(261): error C2803: ‘operator ’ must have at least one formal parameter of class type
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(264): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(264): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(268): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(268): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(272): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkcovariantvector.h(272): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkcovariantvector.hxx(136): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkcovariantvector.hxx(136): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(30): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(30): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(30): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(54): error C2143: syntax error : missing ‘;’ before ‘{’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(54): error C2447: ‘{’ : missing function header (old-style formal list?)
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(73): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(73): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(73): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(74): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(74): error C2065: ‘NColumns’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(74): error C2923: ‘vnl_vector_fixed’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(74): error C2975: ‘n’ : invalid template argument for ‘vnl_vector_fixed’, expected compile-time constant expression
1> e:\itk\source\modules\thirdparty\vnl\src\vxl\core\vnl\vnl_vector_fixed.h(86) : see declaration of ‘n’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(93): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(93): error C2065: ‘NRows’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(93): error C2923: ‘itk::CovariantVector’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(93): error C2975: ‘NVectorDimension’ : invalid template argument for ‘itk::CovariantVector’, expected compile-time constant expression
1> e:\itk\source\modules\core\common\include\itkcovariantvector.h(66) : see declaration of ‘NVectorDimension’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(95): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(95): error C2065: ‘NColumns’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(95): error C2923: ‘itk::CovariantVector’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(95): error C2975: ‘NVectorDimension’ : invalid template argument for ‘itk::CovariantVector’, expected compile-time constant expression
1> e:\itk\source\modules\core\common\include\itkcovariantvector.h(66) : see declaration of ‘NVectorDimension’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(96): error C2143: syntax error : missing ‘;’ before ‘{’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(96): error C2447: ‘{’ : missing function header (old-style formal list?)
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(114): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(114): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(114): error C2371: ‘itk::Matrix’ : redefinition; different basic types
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(73) : see declaration of ‘itk::Matrix’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(114): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(114): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(129): error C2143: syntax error : missing ‘;’ before ‘{’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(129): error C2447: ‘{’ : missing function header (old-style formal list?)
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(146): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(146): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(146): error C2373: ‘itk::Matrix’ : redefinition; different type modifiers
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(73) : see declaration of ‘itk::Matrix’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(146): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(146): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(148): error C2039: ‘+=’ : is not a member of ‘global namespace'' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(167): error C2143: syntax error : missing ';' before '{' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(167): error C2447: '{' : missing function header (old-style formal list?) 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(184): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(184): error C2143: syntax error : missing ';' before '<' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(184): error C2373: 'itk::Matrix' : redefinition; different type modifiers 1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(73) : see declaration of 'itk::Matrix' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(184): error C2988: unrecognizable template declaration/definition 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(184): error C2059: syntax error : '<' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(186): error C2039: '-=' : is not a member of '
global namespace’’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(202): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(202): error C2923: ‘vnl_matrix’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(204): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(204): error C2923: ‘vnl_matrix’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(205): error C2143: syntax error : missing ‘;’ before ‘{’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(205): error C2447: ‘{’ : missing function header (old-style formal list?)
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(214): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(214): error C2182: ‘Matrix’ : illegal use of type ‘void’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(214): error C2371: ‘itk::Matrix’ : redefinition; different basic types
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(73) : see declaration of ‘itk::Matrix’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(214): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(214): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(215): error C2039: '=’ : is not a member of ‘global namespace'' 1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(226): error C2039: '*=' : is not a member of '
global namespace’’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(226): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(226): error C2923: ‘vnl_matrix’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(227): error C2143: syntax error : missing ‘;’ before ‘{’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(227): error C2447: ‘{’ : missing function header (old-style formal list?)
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(236): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(236): error C2086: ‘vnl_vector_fixed<T,n> itk::Matrix’ : redefinition
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(73) : see declaration of ‘itk::Matrix’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(236): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(236): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(237): error C2065: ‘T’ : undeclared identifier
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(237): error C2923: ‘vnl_vector’ : ‘T’ is not a valid template type argument for parameter ‘T’
1>e:\itk\source\modules\core\common\include\itkmatrix.hxx(241): error C2143: syntax error : missing ‘;’ before ‘}’
1>e:\itk\source\modules\core\common\include\itkmatrix.h(76): error C2143: syntax error : missing ‘;’ before ‘<’
1> e:\itk\source\modules\core\common\include\itkmatrix.h(276) : see reference to class template instantiation ‘itk::Matrix<T,NRows,NColumns>’ being compiled
1>e:\itk\source\modules\core\common\include\itkmatrix.h(76): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.h(76): error C2238: unexpected token(s) preceding ‘;’
1>e:\itk\source\modules\core\common\include\itkmatrix.h(79): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkmatrix.h(79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.h(79): error C2238: unexpected token(s) preceding ‘;’
1>e:\itk\source\modules\core\common\include\itkmatrix.h(279): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkmatrix.h(279): error C2143: syntax error : missing ‘,’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkimagebase.h(83): error C2146: syntax error : missing ‘;’ before identifier ‘ImageBase’
1>e:\itk\source\modules\core\common\include\itkimagebase.h(83): error C2470: ‘ImageBase’ : looks like a function definition, but there is no parameter list; skipping apparent body
1>e:\itk\source\modules\core\common\include\itkimagebase.h(83): error C2059: syntax error : ‘public’
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(50): error C2143: syntax error : missing ‘;’ before ‘<’
1> e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(130) : see reference to class template instantiation ‘itk::VectorImageNeighborhoodAccessorFunctor’ being compiled
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(51): error C2238: unexpected token(s) preceding ‘;’
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(53): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(54): error C2238: unexpected token(s) preceding ‘;’
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(104): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvectorimageneighborhoodaccessorfunctor.h(104): error C2143: syntax error : missing ‘,’ before ‘*’
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(69): error C2143: syntax error : missing ‘;’ before ‘<’
1> e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(147) : see reference to class template instantiation ‘itk::ImageBoundaryCondition<TInputImage,TOutputImage>’ being compiled
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(69): error C2238: unexpected token(s) preceding ‘;’
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(129): error C2146: syntax error : missing ‘;’ before identifier ‘GetInputRequestedRegion’
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(129): error C2433: ‘itk::ImageBoundaryCondition<TInputImage,TOutputImage>::RegionType’ : ‘virtual’ not permitted on data declarations
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(129): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(129): error C2143: syntax error : missing ‘,’ before ‘&’
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(131): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkimageboundarycondition.h(134): warning C4183: ‘GetInputRequestedRegion’: missing return type; assumed to be a member function returning ‘int’
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C2433: ‘Vector’ : ‘inline’ not permitted on data declarations
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C2086: ‘int itk::Vector’ : redefinition
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(30) : see declaration of ‘itk::Vector’
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C2988: unrecognizable template declaration/definition
1>e:\itk\source\modules\core\common\include\itkvector.h(265): error C2059: syntax error : ‘<’
1>e:\itk\source\modules\core\common\include\itkvector.h(279): error C2061: syntax error : identifier ‘Vector’
1>e:\itk\source\modules\core\common\include\itkvector.h(279): error C2805: binary ‘operator >>’ has too few parameters
1>e:\itk\source\modules\core\common\include\itkvector.h(281): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkvector.h(281): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvector.h(281): error C2086: ‘int itk::Vector’ : redefinition
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(30) : see declaration of ‘itk::Vector’
1>e:\itk\source\modules\core\common\include\itkvector.h(284): error C2143: syntax error : missing ‘;’ before ‘<’
1>e:\itk\source\modules\core\common\include\itkvector.h(284): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\itk\source\modules\core\common\include\itkvector.h(284): error C2086: ‘int itk::Vector’ : redefinition
1> e:\itk\source\modules\core\common\include\itkmatrix.hxx(30) : see declaration of ‘itk::Vector’
1>e:\itk\source\modules\core\common\include\itkvector.h(284): fatal error C1003: error count exceeds 100; stopping compilation