[Insight-users] errors in building InsightApplications-2.6.0

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 22 20:41:16 EST 2006


Hi Yan Yang,

It seems that you enabled in your Visual Studio environment
the option that marks the .txx files as compilable files.

It is a common mistake for users to do this in order to
get the C++ syntax coloring in the editor.

You can easily verify if this is the problem, by loading
the ITK project into your Visual Studio environment, and
then right clicking on any of the .txx files in the source
tree that Visual Studio displays for you.

If you see the option "Compile" in the menu that appears
when you right click on the .txx file, then you have enabled
that option.

You will find details about this issue in the FAQ:

http://www.itk.org/Wiki/ITK_FAQ#Highlighting_.txx_files_in_Visual_Studio


   Regards,


      Luis



-----------------
Yan Yang wrote:
> Hi all,
>  
> I have got the following error message when building 
> InsightApplications-2.6.0. Any help would be appreciated.
>  
> Thanks,
>  
> Yan
>  
> --------------------Configuration: ImageCalculator - Win32 
> Release--------------------
> Compiling...
> ImageCalculatorProcess2D.cxx
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(149) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(635) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,2> > __cdecl Iavg(class itk
> ::SmartPointer<class itk::Image<double,2> >,int)' being compiled
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(168) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(640) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,2> > __cdecl ImageMultiplyC
> onstant(class itk::SmartPointer<class itk::Image<double,2> >,double)' 
> being compiled
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(185) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(643) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,2> > __cdecl ImageDivideCon
> stant(class itk::SmartPointer<class itk::Image<double,2> >,double)' 
> being compiled
> ImageCalculatorProcess3D.cxx
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(149) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(635) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,3> > __cdecl Iavg(class itk
> ::SmartPointer<class itk::Image<double,3> >,int)' being compiled
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(168) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(640) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,3> > __cdecl ImageMultiplyC
> onstant(class itk::SmartPointer<class itk::Image<double,3> >,double)' 
> being compiled
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\Imgmath.h(185) 
> : error C2899: typename cannot be used outside a template declaration
>         
> C:\Librabries\InsightApplications-2.6.0\InsightApplications-2.6.0\ImageCalculator\ImageCalculatorTemplates.h(643) 
> : see reference to function template instantiation 'class 
> itk::SmartPointer<class itk::Image<double,3> > __cdecl ImageDivideCon
> stant(class itk::SmartPointer<class itk::Image<double,3> >,double)' 
> being compiled
> Generating Code...
> Error executing cl.exe.
>  
> ALL_BUILD - 6 error(s), 0 warning(s)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list