[Insight-users] Problem building ITK 3.12 with GDCM 2.x

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Apr 2 10:45:38 EDT 2009


On Thu, Apr 2, 2009 at 4:21 PM, poireau <joelthelion at laposte.net> wrote:
>
> Hi all,
>
> I'm trying to build ITK with USE_SYSTEM_GDCM with the idea of using both itk and gdcm 2.X in my application. Unfortunately, itk fails to compile when I enable that flag:
>
> @cepe:~/workspace/InsightToolkit-3.12.0> make
> [  0%] Built target itksys
> [  6%] Built target itkjpeg8
> [ 12%] Built target itkjpeg12
> [ 17%] Built target itkjpeg16
> [ 19%] Built target itkopenjpeg
> [ 21%] Built target ITKMetaIO
> [ 25%] Built target ITKNrrdIO
> [ 25%] Built target ITKEXPAT
> [ 25%] Built target ITKznz
> [ 25%] Built target ITKniftiio
> [ 26%] Built target ITKDICOMParser
> [ 26%] Built target itkvcl
> [ 50%] Built target itkv3p_netlib
> [ 50%] Built target itktestlib
> [ 69%] Built target itkvnl
> [ 75%] Built target itkvnl_algo
> [ 77%] Built target itkvnl_inst
> [ 84%] Built target ITKCommon
> [ 87%] Built target ITKNumerics
> [ 87%] Built target ITKBasicFilters
> [ 89%] Built target ITKStatistics
> [ 89%] Built target ITKAlgorithms
> [ 89%] Built target ITKSpatialObject
> [ 95%] Built target ITKIO
> Linking CXX executable ../../bin/itkTestDriver
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_simple_progression'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_start_compress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_CreateDecompress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_std_error'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_abort'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_set_quality'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_calc_output_dimensions'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_stdio_dest'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_stdio_src'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_read_header'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_finish_compress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_start_decompress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_CreateCompress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_write_scanlines'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_finish_decompress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_destroy_decompress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_destroy_compress'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_read_scanlines'
> ../../bin/libITKIO.so.3.12.0: undefined reference to `itk_jpeg8_jpeg_set_defaults'
> collect2: ld returned 1 exit status
> make[2]: *** [bin/itkTestDriver] Error 1
> make[1]: *** [Code/IO/CMakeFiles/itkTestDriver.dir/all] Error 2
> make: *** [all] Error 2
>
>
> Any idea where the problem might come from?

Did you do any build using the internal gdcm ? I am guessing cmake is
getting lost with your change. Always start from an empty binary
directory. In-source build are so old-skool ;)

Or simply 'make clean && make' should work too.

When posting a linking error, you should really send the output of
'make VERBOSE=1' ...

2cts
-- 
Mathieu


More information about the Insight-users mailing list