[Rtk-users] Linking error with rtkLookupTableImageFilter.h

Simon Rit simon.rit at creatis.insa-lyon.fr
Mon Jun 1 15:37:36 EDT 2015


Thanks, it's been pushed to the public repository:
https://github.com/SimonRit/RTK/commit/59b0292cac70369b3e312b9c5f7e68d1cf077dab
Simon

On Mon, Jun 1, 2015 at 7:03 PM, Julia Mascolo-Fortin <
julia.mascolo-fortin.1 at ulaval.ca> wrote:

> Hi,
>
> Thanks, declaring inline those functions corrected my problem.
>
> Julia
> ________________________________________
> De : simon.rit at gmail.com [simon.rit at gmail.com] de la part de Simon Rit [
> simon.rit at creatis.insa-lyon.fr]
> Date d'envoi : 30 mai 2015 05:49
> À : Julia Mascolo-Fortin
> Cc : rtk-users at public.kitware.com
> Objet : Re: [Rtk-users] Linking error with rtkLookupTableImageFilter.h
>
> Hi,
> I didn't manage to reprocude your problem quickly but my guess is that
> the problem is that the template specializations in this class have
> not been declare inline. Can you try to use the attached file,
> recompile RTK and then your software to check if this solves the
> problem?
> Thanks for the report and please don't hesitate to report your other
> 'shared libs option' bug.
> Simon
>
> On Fri, May 29, 2015 at 11:34 PM, Julia Mascolo-Fortin
> <julia.mascolo-fortin.1 at ulaval.ca> wrote:
> > Hi,
> >
> > I'm having a linking error with a RTK project when I include the file
> rtkLookupTableImageFilter.h (or any RTK file that includes it).
> > If the #include is in the main.cxx, the program compiles and run, but if
> it's in any other source or header files, I see those errors:
> >
> > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT<float,
> float>::operator()(float const&) const':
> > main.cpp:(.text+0x0): multiple definition of `rtk::Functor::LUT<float,
> float>::operator()(float const&) const'
> > CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0x0):
> first defined here
> > CMakeFiles/test.dir/main.cpp.o: In function `rtk::Functor::LUT<double,
> double>::operator()(double const&) const':
> > main.cpp:(.text+0xd0): multiple definition of `rtk::Functor::LUT<double,
> double>::operator()(double const&) const'
> >
> CMakeFiles/test.dir/ReadingWriting.cpp.o:ReadingWriting.cpp:(.text+0xd0):
> first defined here
> >
> >
> > Also, when I comment the lines where the functions
> rtk::Functor::LUT<float, float>::operator()(float const&) const and
> rtk::Functor::LUT<double, double>::operator()(double const&) const are
> defined (lines 96 to 112) the program compiles juste fine.
> >
> > I use:
> >
> > OS: Linux (Mageia 2)
> > Compiler: gcc 4.6.3
> > ITK version: 4.5.1
> > RTK version: the one downloaded from git on May 28 2015
> >
> > I have compiled RTK and ITK in Release mode and without the shared libs
> option (there's another bug if I try to put this option on).
> >
> >
> >
> > Thank you for any clue on how to solve the problem,
> >
> > Julia Mascolo-Fortin
> > _______________________________________________
> > Rtk-users mailing list
> > Rtk-users at public.kitware.com
> > http://public.kitware.com/mailman/listinfo/rtk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20150601/a2e6694f/attachment-0009.html>


More information about the Rtk-users mailing list