[Insight-users] Problem linking InsightApplications libITKFltkImageViewer.so

Chris Turner cturnercomplex at googlemail.com
Mon Jul 26 15:29:23 EDT 2010


I proceeded in my efforts to build the Curve2DExtraction. I think the
problem was that I built fltk not as shared libs.

Anyway now i get the following error message when I try to compile
Curve2DExtraction:

[100%] Building CXX object
Curves2DExtractor/CMakeFiles/Curves2DExtractor.dir/main.o
Linking CXX executable Curves2DExtractor
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`ceExtractorConsole::ceExtractorConsole()':
ceExtractorConsole.cxx:(.text+0x2005): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x2027): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x221f): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`ceExtractorConsole::ceExtractorConsole()':
ceExtractorConsole.cxx:(.text+0x4243): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4265): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x445d): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`ceExtractorConsole::~ceExtractorConsole()':
ceExtractorConsole.cxx:(.text+0x4523): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x453c): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4556): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x456f): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x484d): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
ceExtractorConsole.cxx:(.text+0x4869): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`ceExtractorConsole::~ceExtractorConsole()':
ceExtractorConsole.cxx:(.text+0x4937): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4950): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x496a): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4983): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4c61): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
ceExtractorConsole.cxx:(.text+0x4c7d): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`ceExtractorConsole::~ceExtractorConsole()':
ceExtractorConsole.cxx:(.text+0x4d4b): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4d64): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4d7e): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x4d97): undefined reference to
`fltkDisplayGlWindowGUI::~fltkDisplayGlWindowGUI()'
ceExtractorConsole.cxx:(.text+0x5075): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
ceExtractorConsole.cxx:(.text+0x5091): undefined reference to
`ceExtractorConsoleGUI::~ceExtractorConsoleGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`fltk::Image2DViewer<double>::Image2DViewer()':
ceExtractorConsole.cxx:(.text._ZN4fltk13Image2DViewerIdEC1Ev[fltk::Image2DViewer<double>::Image2DViewer()]+0x1ab):
undefined reference to `fltkImage2DViewerGUI::~fltkImage2DViewerGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o):(.data.rel.ro._ZTV18ceExtractorConsole[vtable
for ceExtractorConsole]+0xc8): undefined reference to
`ceExtractorConsoleGUI::ShowMaxEigenVector()'
libCurves2DExtractorLib.a(ceExtractorConsole.o):(.data.rel.ro._ZTI18ceExtractorConsole[typeinfo
for ceExtractorConsole]+0x10): undefined reference to `typeinfo for
ceExtractorConsoleGUI'
libCurves2DExtractorLib.a(ceExtractorConsole.o):(.data.rel.ro._ZTIN4fltk13Image2DViewerIdEE[typeinfo
for fltk::Image2DViewer<double>]+0x28): undefined reference to
`typeinfo for fltkImage2DViewerGUI'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`fltk::Image2DViewer<double>::~Image2DViewer()':
ceExtractorConsole.cxx:(.text._ZN4fltk13Image2DViewerIdED1Ev[fltk::Image2DViewer<double>::~Image2DViewer()]+0x8e):
undefined reference to `fltkImage2DViewerGUI::~fltkImage2DViewerGUI()'
ceExtractorConsole.cxx:(.text._ZN4fltk13Image2DViewerIdED1Ev[fltk::Image2DViewer<double>::~Image2DViewer()]+0xa5):
undefined reference to `fltkImage2DViewerGUI::~fltkImage2DViewerGUI()'
libCurves2DExtractorLib.a(ceExtractorConsole.o): In function
`fltk::Image2DViewer<double>::~Image2DViewer()':
ceExtractorConsole.cxx:(.text._ZN4fltk13Image2DViewerIdED0Ev[fltk::Image2DViewer<double>::~Image2DViewer()]+0x8e):
undefined reference to `fltkImage2DViewerGUI::~fltkImage2DViewerGUI()'
ceExtractorConsole.cxx:(.text._ZN4fltk13Image2DViewerIdED0Ev[fltk::Image2DViewer<double>::~Image2DViewer()]+0xa5):
undefined reference to `fltkImage2DViewerGUI::~fltkImage2DViewerGUI()'
libCurves2DExtractorLib.a(ceExtractorConsoleBase.o): In function
`fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::FrustumFunctionControl()':
ceExtractorConsoleBase.cxx:(.text._ZN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEEC1Ev[fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::FrustumFunctionControl()]+0x2aa): undefined
ref
erence to `fltkFrustumFunctionControlGUI::~fltkFrustumFunctionControlGUI()'
libCurves2DExtractorLib.a(ceExtractorConsoleBase.o):(.data.rel.ro._ZTIN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEEE[typeinfo
for fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >]+0x2
8): undefined reference to `typeinfo for fltkFrustumFunctionControlGUI'
libCurves2DExtractorLib.a(ceExtractorConsoleBase.o): In function
`fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()':
ceExtractorConsoleBase.cxx:(.text._ZN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEED1Ev[fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()]+0xc1): undefined
ref
erence to `fltkFrustumFunctionControlGUI::~fltkFrustumFunctionControlGUI()'
ceExtractorConsoleBase.cxx:(.text._ZN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEED1Ev[fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()]+0xd8): undefined
ref
erence to `fltkFrustumFunctionControlGUI::~fltkFrustumFunctionControlGUI()'
libCurves2DExtractorLib.a(ceExtractorConsoleBase.o): In function
`fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()':
ceExtractorConsoleBase.cxx:(.text._ZN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEED0Ev[fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()]+0xc1): undefined
ref
erence to `fltkFrustumFunctionControlGUI::~fltkFrustumFunctionControlGUI()'
ceExtractorConsoleBase.cxx:(.text._ZN4fltk22FrustumFunctionControlIN3itk22FrustumSpatialFunctionILj3ENS1_5PointIfLj3EEEEEED0Ev[fltk::FrustumFunctionControl<itk::FrustumSpatialFunction<3u,
itk::Point<float, 3u> > >::~FrustumFunctionControl()]+0xd8): undefined
ref
erence to `fltkFrustumFunctionControlGUI::~fltkFrustumFunctionControlGUI()'
libCurves2DExtractorLib.a(ceExtractorConsoleGUI.o): In function
`ceExtractorConsoleGUI::ceExtractorConsoleGUI()':
ceExtractorConsoleGUI.cxx:(.text+0x9e2): undefined reference to
`vtable for ceExtractorConsoleGUI'
libCurves2DExtractorLib.a(ceExtractorConsoleGUI.o): In function
`ceExtractorConsoleGUI::ceExtractorConsoleGUI()':
ceExtractorConsoleGUI.cxx:(.text+0x451e): undefined reference to
`vtable for ceExtractorConsoleGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkDisplayGlWindowGUI.o):
In function `fltkDisplayGlWindowGUI::fltkDisplayGlWindowGUI()':
fltkDisplayGlWindowGUI.cxx:(.text+0x18): undefined reference to
`vtable for fltkDisplayGlWindowGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkDisplayGlWindowGUI.o):
In function `fltkDisplayGlWindowGUI::fltkDisplayGlWindowGUI()':
fltkDisplayGlWindowGUI.cxx:(.text+0x1f0): undefined reference to
`vtable for fltkDisplayGlWindowGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkFrustumFunctionControlGUI.o):
In function `fltkFrustumFunctionControlGUI::fltkFrustumFunctionControlGUI()':
fltkFrustumFunctionControlGUI.cxx:(.text+0x3e8): undefined reference
to `vtable for fltkFrustumFunctionControlGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkFrustumFunctionControlGUI.o):
In function `fltkFrustumFunctionControlGUI::fltkFrustumFunctionControlGUI()':
fltkFrustumFunctionControlGUI.cxx:(.text+0xf98): undefined reference
to `vtable for fltkFrustumFunctionControlGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkImage2DViewerGUI.o):
In function `fltkImage2DViewerGUI::fltkImage2DViewerGUI()':
fltkImage2DViewerGUI.cxx:(.text+0x148): undefined reference to `vtable
for fltkImage2DViewerGUI'
../Auxiliary/FltkImageViewer/libITKFltkImageViewer.a(fltkImage2DViewerGUI.o):
In function `fltkImage2DViewerGUI::fltkImage2DViewerGUI()':
fltkImage2DViewerGUI.cxx:(.text+0x50e): undefined reference to `vtable
for fltkImage2DViewerGUI'
/media/Passport/work/stuff/itk/fltk-1.3.x-r7677/build/lib/libfltk_images.so:
undefined reference to `XineramaQueryScreens'
/media/Passport/work/stuff/itk/fltk-1.3.x-r7677/build/lib/libfltk_images.so:
undefined reference to `XineramaIsActive'
collect2: ld returned 1 exit status
make[2]: *** [Curves2DExtractor/Curves2DExtractor] Error 1
make[1]: *** [Curves2DExtractor/CMakeFiles/Curves2DExtractor.dir/all] Error 2
make: *** [all] Error 2


Does anybody know what went wrong? Did I specify wrong fltk parameter in ccmake?

Again any help is appreciated.


Thanks
Chris

On Thu, Jul 22, 2010 at 2:35 PM, Chris Turner
<cturnercomplex at googlemail.com> wrote:
> I checked again my code and I didn't change anything in the main
> centerline pipeline and get this as result (see attachment) Note: This
> is the original picture form the website:
> http://www.itk.org/ITK/applications/Curve2DExtraction.html
>
>
> Maybe somebody, who got the Curve2DExtraction running, can check if
> the original example behaves the same.
>
> Thanks
> Chris
>
>
> On Wed, Jul 21, 2010 at 4:24 PM, Chris Turner
> <cturnercomplex at googlemail.com> wrote:
>> So I'm currently trying to extract the logic of Curves2DExtractor to
>> free it from its fltk dependency. Basically what I did was to remove
>> all fltk reverences and especially the SpatialFunctionControl
>> variable. Which is only used for visualization right?
>>
>> But my problem is now that when I load a DSA JPEG picture the filter
>> makes all the white regions red. Which is definitely not what it
>> suppose to do. But I didn't changed much beside of removing the
>> SpatialFunctionControl.  If it helps I could post my code...
>>
>>
>> Btw still trying to compile the original code. Used several fltk
>> version but nothing helped.
>>
>> I appreciated any help!
>>
>> Thanks
>> Chris
>>
>>
>> On Tue, Jul 20, 2010 at 6:11 PM, Chris Turner
>> <cturnercomplex at googlemail.com> wrote:
>>> Hi Everyone,
>>>
>>> I'm trying to compile InsightApplications v. 3.20, and I get the
>>> following linking error when I try to compile the Curves2DExtractor:
>>>
>>>
>>> Linking CXX shared library libITKFltkImageViewer.so
>>> /usr/bin/ld: /itk/fltk-1.3.x-r7677/build/lib/libfltk.a(Fl.cxx.o):
>>> relocation R_X86_64_32S against `.bss' can not be used when making a
>>> shared object; recompile with -fPIC
>>> /itk/fltk-1.3.x-r7677/build/lib/libfltk.a: could not read symbols: Bad value
>>> collect2: ld returned 1 exit status
>>> make[2]: *** [Auxiliary/FltkImageViewer/libITKFltkImageViewer.so] Error 1
>>> make[1]: *** [Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/all]
>>> Error 2
>>> make: *** [all] Error 2
>>>
>>> I added the -fPIC to the cxx an c flag option with cmake but it didn't
>>> make a difference.
>>>
>>> g++:
>>> Using built-in specs.
>>> Target: x86_64-redhat-linux
>>> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
>>> --infodir=/usr/share/info
>>> --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
>>> --enable-shared --enable-threads=posix --enable-checking=release
>>> --with-system-zlib --enable-__cxa_atexit
>>> --disable-libunwind-exceptions
>>> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
>>> --enable-java-awt=gtk --disable-dssi --enable-plugin
>>> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
>>> --enable-libgcj-multifile --enable-java-maintainer-mode
>>> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
>>> --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
>>> --with-arch_32=i586 --build=x86_64-redhat-linux
>>> Thread model: posix
>>> gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
>>>
>>> What am I doing wrong?
>>>
>>> Thanks,
>>> Chris
>>>
>>
>


More information about the Insight-users mailing list