[Insight-users] compiling ITK with gcc 3.2?

Luis Ibanez luis.ibanez@kitware.com
Tue, 15 Oct 2002 14:54:29 -0400


Hi Harri,

Given that the compiler error is produced in the
expansion of a macro it is hard to figure out
where the error is comming from.

Could you please try the following,

Temporarily replace the line

      VNL_MATRIX_INSTANTIATE(double)

    in vnl_matrix+double-.cxx

with the actual content of the Macro as defined in

    Insight/Code/Numerics/vxl/vnl/vnl_matrix.txx:

It should look something like:

template class vnl_matrix<T >;
template vnl_matrix<T > operator-(T const &, vnl_matrix<T > const &);
VCL_INSTANTIATE_INLINE(vnl_matrix<T > operator+(T const &, vnl_matrix<T 
 > const &));
VCL_INSTANTIATE_INLINE(vnl_matrix<T > operator*(T const &, vnl_matrix<T 
 > const &));
template T dot_product(vnl_matrix<T > const &, vnl_matrix<T > const &);
template T inner_product(vnl_matrix<T > const &, vnl_matrix<T > const &);
template T cos_angle(vnl_matrix<T > const &, vnl_matrix<T > const &);
template vnl_matrix<T > element_product(vnl_matrix<T > const &, 
vnl_matrix<T > const &);
template vnl_matrix<T > element_quotient(vnl_matrix<T > const &, 
vnl_matrix<T > const &);
template int vnl_inplace_transpose(T*, unsigned, unsigned, char*, 
unsigned);
template vcl_ostream & operator<<(vcl_ostream &, vnl_matrix<T > const &);
template vcl_istream & operator>>(vcl_istream &, vnl_matrix<T >       &);
VCL_INSTANTIATE_INLINE(bool operator!=(vnl_matrix<T > const &, 
vnl_matrix<T > const &))



Note that the "\" should be removed so each line is passed
independently to the compiler.

This should help us to identify the offending line.


Thanks

    Luis

=========================================

Harri Tapio Jaalinoja wrote:
> Hi Mathieu (and others),
> 
> sorry to say it still does not work, I get the same error (non-template
> used as template)
> 
> I also tried adding '#include <cstdio>' in
> Code/Numerics/vxl/vnl/vnl_matrix.txx, where the definition
> #define VNL_MATRIX_INSTANTIATE(T) \
> is, but that did not help either (this was just guesswork).
> 
> [hajaalin@gene Build]$ echo $CC; echo $CXX
> /usr/bin/gcc
> /usr/bin/gcc
> [hajaalin@gene Build]$ gcc --version
> gcc (GCC) 3.2 (Mandrake Linux 9.0 3.2-2mdk)
> 
> Thanks,
> 
> Harri
> 
> 
> On Tue, 15 Oct 2002, Mathieu Malaterre wrote:
> 
> 
>>Hi Harri (again),
>>  Could you try adding:
>>#include <cstdio>
>>in
>>Insight/Code/Numerics/vxl/vnl/Templates/vnl_matrix+double-.cxx
>>
>>or else try adding -Wno-deprecated in CMAKE_CXX_FLAGS (in your
>>CMakeCache.txt file).
>>
>>and tell me if it works ?
>>
>>thanks
>>
>>ref:
>>http://www.geocrawler.com/archives/3/216/2001/4/150/5671325/
>>
>>mathieu
>>