[Insight-users] Re: problem with the new version

Luis Ibanez luis . ibanez at kitware . com
Mon, 10 Jun 2002 12:19:57 -0400


Hi cspl,

Looking closely at your error messages, you can notice
that you are mixing two directories of ITK code:

1)    F:\10.06.2002ITK
2)    F:\ITK

You should be doing an incorrect setup that is mixing
the header files of one version with the other.

Note that once you run CMake, you should *not* modifiy the
VC++ project settings for any reason. Any need for doing
so, will only indicate that the configuration was done
incorrectly, and in that case you should correct the problem
by using CMake. If you are doing something like adding
include directories in VC++ with the Build/Custom options,
this will certainly confuse the build please don't use any
of these options.

Those things were only necesary in the "Dark Ages" when
CMake didn't exist  :-)


Please do the following:

1) erase all the previous directories where you
    have put ITK source code and binary code

2) do a fresh checkout using cvs

3) restart the configuration.

4) Make sure that you DONT have any ITK directories
    in "Tools->Options->Directories" in VC++


Please let us know if you find any problem.

Thanks

   Luis

===================================================

cspl wrote:

I have downloaded the new version of itk through wincvs.But I am getting 
somany errors while building  the project to get lib files. The errors 
are as follows.

I could compile the Basic filters, common, vxl and FEM and get the 
corresponding lib files.

Could not compile Numeric and IO source code..

Please help us



compiling...
itkAmoebaOptimizer.cxx
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(54) : error C2976: 'Array' 
: too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(62) : error C2976: 'Array' 
: too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(96) : error C2079: 
'm_InitialPosition' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(97) : error C2079: 
'm_CurrentPosition' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(98) : error C2079: 
'm_Scales' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCostFunction.h(51) : error C2976: 
'Array' : too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkSingleValuedCostFunction.h(54) : error 
C2976: 'Array' : too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkAmoebaOptimizer.cxx(73) : error C2079: 
'scales' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkAmoebaOptimizer.cxx(74) : error C2228: 
left of '.Fill' must have class/struct/union type
F:\10.06.2002ITK\Code\Numerics\itkAmoebaOptimizer.cxx(75) : fatal error 
C1903: unable to recover from previous error(s); stopping compilation
itkCacheableScalarFunction.cxx
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.h(66) : error 
C2976: 'Array' : too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.h(114) : error 
C2079: 'm_CacheTable' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.cxx(37) : 
error C2440: 'type cast' : cannot convert from 'long' to 'class 
itk::Array<double>'
         Source or target has incomplete type
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.cxx(47) : 
error C2109: subscript requires array or pointer type
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.cxx(47) : 
error C2106: '=' : left operand must be l-value
itkCompositeValleyFunction.cxx
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.h(66) : error 
C2976: 'Array' : too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkCacheableScalarFunction.h(114) : error 
C2079: 'm_CacheTable' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(24) : 
error C2027: use of undefined type 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(24) : 
error C2228: left of '.size' must have class/struct/union type
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(26) : 
error C2027: use of undefined type 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(26) : 
error C2228: left of '.size' must have class/struct/union type
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(44) : 
error C2676: binary '[' : 'const class itk::Array<double>' does not 
define this operator or a conversion to a type acceptable to the 
predefined operator
F:\10.06.2002ITK\Code\Numerics\itkCompositeValleyFunction.cxx(44) : 
error C2676: binary '[' : 'const class itk::Array<double>' does not 
define this operator or a conversion to a type acceptable to the 
predefined operator
itkConjugateGradientOptimizer.cxx
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(54) : error C2976: 'Array' 
: too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(62) : error C2976: 'Array' 
: too few template arguments
         F:\ITK\Insight\Code\Common\itkArray.h(435) : see declaration of 
'Array'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(96) : error C2079: 
'm_InitialPosition' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(97) : error C2079: 
'm_CurrentPosition' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkOptimizer.h(98) : error C2079: 
'm_Scales' uses undefined class 'Array<double>'
F:\10.06.2002ITK\Code\Numerics\itkCostFunction.h(51) : error C2976: 
'Array' : too few template arguments
         F:\ITK\Insight\Code