[Insight-users] compiling ITK with gcc 3.2?

Mathieu Malaterre malat@free.fr
Thu, 17 Oct 2002 01:22:09 +0200


Hi Harry,
  I think Luis meant that you tried removing *all* object files from 
Insight/Build/Code/Numerics directory (*.o files)

Could you also check that g++ version is 3.2 too

mathieu


Harri Tapio Jaalinoja wrote:

>Hi,
>
>yes, I tried removing everything from Build/bin, but it did not help.
>
>Cheers,
>Harri
>
>On Wed, 16 Oct 2002, Luis Ibanez wrote:
>
>  
>
>>Hi Harri,
>>
>>Good to know that the VCL_NEEDS_INLINE_INSTANTIATION
>>declaration must be different for gcc 3.2. We probably
>>can setup this on the main CMakeLists.txt file.
>>
>>
>>The new errors seem to be a linking problem.
>>
>>The itkNumericsHeaderTest is pretty simple. It only
>>includes all the headers in the Insight/Code/Numerics
>>directory.  The intent is to verify tha the headers
>>can pass a simple syntax check.
>>
>>Did you try cleaning the binary directory ?
>>
>>
>>
>>    Luis
>>
>>
>>=========================================
>>
>>Harri Tapio Jaalinoja wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>with the vnl_matrix+double-.cxx looking like this...
>>>
>>>-- clip --
>>>template class vnl_matrix<double >;
>>>template vnl_matrix<double > operator-(double const &, vnl_matrix<double > const &);
>>>VCL_INSTANTIATE_INLINE(vnl_matrix<double > operator+(double const &, vnl_matrix<double > const &));
>>>VCL_INSTANTIATE_INLINE(vnl_matrix<double > operator*(double const &, vnl_matrix<double > const &));
>>>template double dot_product(vnl_matrix<double > const &, vnl_matrix<double > const &);
>>>template double inner_product(vnl_matrix<double > const &, vnl_matrix<double > const &);
>>>template double cos_angle(vnl_matrix<double > const &, vnl_matrix<double > const &);
>>>template vnl_matrix<double > element_product(vnl_matrix<double > const &, vnl_matrix<double > const &);
>>>template vnl_matrix<double > element_quotient(vnl_matrix<double > const &, vnl_matrix<double > const &);
>>>template int vnl_inplace_transpose(double*, unsigned, unsigned, char*, unsigned);
>>>template vcl_ostream & operator<<(vcl_ostream &, vnl_matrix<double > const &);
>>>template vcl_istream & operator>>(vcl_istream &, vnl_matrix<double >       &);
>>>VCL_INSTANTIATE_INLINE(bool operator!=(vnl_matrix<double > const &, vnl_matrix<double > const &))
>>>-- clip --
>>>
>>>... the error comes from the last line.
>>>
>>>I can get over this by using the trick pointed out by Koen, setting
>>>#define VCL_NEEDS_INLINE_INSTANTIATION 0
>>>in Build/Code/Numerics/vxl/vcl/vcl_config_compiler.h
>>>
>>>However, now I encounter this error:
>>>
>>>itkNumericsHeaderTest.o: In function
>>>`__static_initialization_and_destruction_0(int, int)':
>>>itkNumericsHeaderTest.o(.text+0x36): undefined reference to
>>>`std::ios_base::Init::Init[in-charge]()'
>>>itkNumericsHeaderTest.o: In function `__tcf_0':
>>>itkNumericsHeaderTest.o(.text+0x65): undefined reference to
>>>`std::ios_base::Init::~Init [in-charge]()'
>>>itkNumericsHeaderTest.o(.eh_frame+0x11): undefined reference to
>>>`__gxx_personality_v0'
>>>collect2: ld returned 1 exit status
>>>make[7]: ***
>>>[/home/hajaalin/Insight_CVS/Insight/Build/bin/itkNumericsHeaderTest] Error
>>>1
>>>make[6]: *** [default_target] Error 2
>>>make[5]: *** [default_target_Numerics] Error 2
>>>make[4]: *** [default_target] Error 2
>>>make[3]: *** [default_target_Code] Error 2
>>>make[2]: *** [default_target] Error 2
>>>make[1]: *** [default_target_Testing] Error 2
>>>make: *** [default_target] Error 2
>>>
>>>
>>>Making good progress, but not quite there yet :)
>>>
>>>Thanks,
>>>Harri
>>>
>>>
>>>On Tue, 15 Oct 2002, Luis Ibanez wrote:
>>>
>>>
>>>      
>>>
>>
>>
>>    
>>
>
>_______________________________________________
>Insight-users mailing list
>Insight-users@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-users
>
>
>  
>


-- 
Le superflu n'est inutile qu'ŕ ceux qui pensent que le nécessaire est suffisant (P. Desproges)

Mathieu Malaterre
170 chemin des minimes
01600 PARCIEUX
http://mathieu.malaterre.com