[Insight-developers] Re: [Insight-users] Fixing bugs for ITK with MinGW

Brad King brad.king at kitware.com
Tue Sep 4 19:56:26 EDT 2007


>  > Index: itkDataObject.cxx
>  > ===================================================================
>  > RCS file: /cvsroot/Insight/Insight/Code/Common/itkDataObject.cxx,v
>  > retrieving revision 1.55
>  > diff -r1.55 itkDataObject.cxx
>  > 26c26
>  > < template class itk::SmartPointerForwardReference<itk::ProcessObject>;
>  > ---
>  > > ITKCommon_EXPORT template class
>  > itk::SmartPointerForwardReference<itk::ProcessObject>;
>  >
> 
> Unfortunately, exporting the symbol did not work, I get this errors:
> 
> Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkDataObject.obj
> e:/dev/itk/InsightToolkit-CVS-src/Code/Common/itkDataObject.cxx:26: 
> error: expected unqualified-id before "template"
> e:/dev/itk/InsightToolkit-CVS-src/Code/Common/itkDataObject.cxx:26: 
> error: expected `,' or `;' before "template"
> make[2]: *** [Code/Common/CMakeFiles/ITKCommon.dir/itkDataObject.obj] 
> Error 1
> make[1]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
> make: *** [all] Error 2

The export syntax in Luis's patch was incorrect.  Try this instead:

template class ITKCommon_EXPORT 
itk::SmartPointerForwardReference<itk::ProcessObject>;

-Brad



More information about the Insight-developers mailing list