[Insight-users] Error in the compilation

Luis Ibanez luis.ibanez at kitware.com
Tue, 06 Jan 2004 13:13:56 -0500


Hi Rodrigo,

You are probably trying to compile a recent version
of the "InsightApplications" CVS checkout using an
older version of the "Insight" CVS checkout.


The message

   "conversion loses qualifiers"

indicates that the constness of the API is not
being respected.


The classes in

       Insight/Code/Numeric/Statistics

were modified three week ago in order to enhance
their support for const-correctness.
http://www.itk.org/cgi-bin/cvsweb.cgi/Insight/Code/Numerics/Statistics/?cvsroot=Insight&sortby=date#dirlist



Please update your checkout of Insight, rebuild it
and then rebuild InsightApplications.


Regards,


   Luis



------------------------
Rodrigo Trujillo wrote:

> Hi
> 
> I'm trying to compile the Insight Applications but the following error 
> occurs:
>  
> --------------------Configuration: GaussianMinimumErrorClassifier - 
> Win32 Release--------------------
> Compiling...
> GaussianMinimumErrorClassifier.cxx
> C:\InsightApplications\GaussianMinimumErrorClassifier\GaussianMinimumErrorClassifier.cxx(301) 
> : error C2662: 'GetClassSample' : cannot convert 'this' pointer from 
> 'const class itk::Statistics::MembershipSample<class 
> itk::Statistics::ImageToListAdapt
> or<class itk::Image<class itk::Vector<short,1>,3>,class 
> itk::Vector<short,1> > >' to 'class 
> itk::Statistics::MembershipSample<class 
> itk::Statistics::ImageToListAdaptor<class itk::Image<class 
> itk::Vector<short,1>,3>,class itk::Vector<short,1> > > &'
>         Conversion loses qualifiers
> C:\InsightApplications\GaussianMinimumErrorClassifier\GaussianMinimumErrorClassifier.cxx(306) 
> : error C2662: 'GetClassSample' : cannot convert 'this' pointer from 
> 'const class itk::Statistics::MembershipSample<class 
> itk::Statistics::ImageToListAdapt
> or<class itk::Image<class itk::Vector<short,1>,3>,class 
> itk::Vector<short,1> > >' to 'class 
> itk::Statistics::MembershipSample<class 
> itk::Statistics::ImageToListAdaptor<class itk::Image<class 
> itk::Vector<short,1>,3>,class itk::Vector<short,1> > > &'
>         Conversion loses qualifiers
> Error executing cl.exe.
>  
> ALL_BUILD - 2 error(s), 0 warning(s)
>  
> -----------------------------------------------------------------------------------------------------------------------------------------
>  
>  
> I do not know what to do, because he does not have updates in the CVS.
>  
> Thanks.
>  
>  
> Rodrigo Trujillo
>  
>