[Insight-users] Visual 6 Problem
Jordi Inglada
jordi.inglada at cnes.fr
Thu Jul 6 11:11:11 EDT 2006
Dear all,
We are having some trouble to compile an application which uses ITK. We
have implemented our own image file writer in order to add some specific
functionnalities for remote sensing meta-data. Our ImageFileWriter
belongs to a namespace called otb and inherits from the
itk::ImageFileWriter :
namespace otb
{
template <class TInputImage>
class ITK_EXPORT ImageFileWriter : public
itk::ImageFileWriter<TInputImage>
{ ...
When compiling a simple example (ThresholdImageFilter.cxx), Visual C++ 6
is not happy and says :
ThresholdImageFilter.cxx
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Code\IO
\otbImageFileWriter.h(42) : error C2504: 'ImageFileWriter<class
itk::Image<unsigned char,2> >' : base class undefined
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(197) : see reference to class template
instantiation 'otb::ImageFileWriter<class itk::Image<unsigned char,2> >'
being compiled
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(198) : error C2039: 'SetInput' : is not a
member of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(259) : error C2039: 'SetFileName' : is not a
member of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(260) : error C2039: 'Update' : is not a member
of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(279) : error C2039: 'SetFileName' : is not a
member of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(280) : error C2039: 'Update' : is not a member
of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(297) : error C2039: 'SetFileName' : is not a
member of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
D:\PROJETS\OTB\Install\OrfeoToolKit-1.0.0\Examples\Filtering
\ThresholdImageFilter.cxx(298) : error C2039: 'Update' : is not a member
of 'ImageFileWriter<class itk::Image<unsigned char,2> >'
Error executing cl.exe. ThresholdImageFilter.exe - 8 error(s), 0
warning(s)
*******************************************************************************
This code compiles without problem with gcc 3 and 4 on Linux and
Solaris.
Thanks for your help.
Jordi
--
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel. +33.(0)5.61.27.33.97 - Fax. +33.(0)5.61.28.31.09
More information about the Insight-users
mailing list