[Insight-developers] Re: ftt porblems on mac os x
Luis Ibanez
luis.ibanez at kitware.com
Mon Jan 15 10:33:34 EST 2007
Hi Gaetan,
From the error message:
ld: multiple definitions of symbol __ZN12vnl_fft_baseILi3EfEC1Ev
CMakeFiles/FFTJava.dir/wrap_itkFFTRealToComplexConjugateImageFilterJava.o
definition of __ZN12vnl_fft_baseILi3EfEC1Ev in section (__TEXT,__text)
CMakeFiles/FFTJava.dir/wrap_itkVnlFFTRealToComplexConjugateImageFilterJava.o
definition of __ZN12vnl_fft_baseILi3EfEC1Ev in section (__TEXT,__text)
ld: multiple definitions of symbol __ZN12vnl_fft_baseILi3EfEC2Ev
CMakeFiles/FFTJava.dir/wrap_itkFFTRealToComplexConjugateImageFilterJava.o
definition of __ZN12vnl_fft_baseILi3EfEC2Ev in section (__TEXT,__text)
CMakeFiles/FFTJava.dir/wrap_itkVnlFFTRealToComplexConjugateImageFilterJava.o
definition of __ZN12vnl_fft_baseILi3EfEC2Ev in section (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
It seems that the symbol is being compiled in two different cxx files.
It is probably due to the way the wrapping instantiate base classes.
The base class seems to be instantiated by the derived VnlFFT class
and it is also instantiated as a class directly:
/Insight/Wrapping/WrapITK/Modules/FFT
wrap_itkFFTRealToComplexConjugateImageFilter.cmake
wrap_itkVnlFFTRealToComplexConjugateImageFilter.cmake
Curiously this does not happen for the
ComplexConjugateToReal classes...
The last changes used to fix Visual Studio 6.0, were related to
avoiding cross-including the .h and .txx files multiple times.
I agree that overloading the New() method is not how ITK was supposed
to operate. Such approach is not scalable and it requires all the
classes to know about the others. This could have been done in a
cleaner way by using the Factory mechanism.
Regards,
Luis
----------------------
Gaetan Lehmann wrote:
>
> Hi Luis,
>
> There are some problems with fft on mac os x - see
> http://www.itk.org/Testing/Sites/gbook.local/Darwin-c++/20070115-0100-Nightly/BuildError.html
>
> Do you think your last changes to fix the msvc6 build can have cause
> that problem ?
>
> BTW, the New() method which return on implementation or the other was
> looking like a good idea, but if it is too difficult to implement with
> all the compilers, we can also remove it and stay with the explicit
> usage as before.
>
> Thanks,
>
> Gaetan
>
More information about the Insight-developers
mailing list