[Insight-users] Errors compiling ITK 3.4.0 with system GDCM

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Jan 24 12:30:02 EST 2008


On Jan 24, 2008 5:27 PM, Wagner Sales <wsales at gmail.com> wrote:
> Hi all,
>
> That's are more a report than a question. I downloaded the GDCM 1.3.2,
> compiled and installed. After that, I tried to compile ITK turning on the
> ITK_USE_SYSTEM_GDCM, just to not have two versions of GDCM installed on my
> machine.
> The following errors are showed:
>
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:33:45:
> error: gdcmValEntry.h: No such file or directory
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:34:45:
> error: gdcmBinEntry.h: No such file or directory
> /usr/include/gdcm/gdcmFile.h: In destructor 'virtual
> itk::GDCMImageIO::~GDCMImageIO()':
> /usr/include/gdcm/gdcmFile.h:193: error: 'virtual gdcm::File::~File()' is
> protected
>  /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:146:
> error: within this context
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx: In member
> function 'virtual bool itk::GDCMImageIO::CanReadFile(const char*)':
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:247:
> error: 'CanReadFile' is not a member of 'gdcm::Document'
> /usr/include/gdcm/gdcmFileHelper.h: In member function 'virtual void
> itk::GDCMImageIO::Read(void*)':
> /usr/include/gdcm/gdcmFileHelper.h:187: error:
> 'gdcm::FileHelper::FileHelper(gdcm::File*)' is protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:433:
> error: within this context
> /usr/include/gdcm/gdcmFileHelper.h:188: error: 'virtual
> gdcm::FileHelper::~FileHelper()' is protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:433:
> error: within this context
> /usr/include/gdcm/gdcmFile.h: In member function 'void
> itk::GDCMImageIO::InternalReadImageInformation(std::ifstream&)':
> /usr/include/gdcm/gdcmFile.h:192: error: 'gdcm::File::File()' is protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:514:
> error: within this context
> /usr/include/gdcm/gdcmFile.h:193: error: 'virtual gdcm::File::~File()' is
> protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:515:
> error: within this context
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: 'BinEntry' is not a member of 'gdcm'
>  /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: 'b' was not declared in this scope
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: expected type-specifier
>  /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: expected `>'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: expected `('
> /home/wsales/head/InsightToolkit- 3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: 'BinEntry' is not a member of 'gdcm'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:679:
> error: expected primary-expression before '>' token
> /home/wsales/head/InsightToolkit- 3.4.0/Code/IO/itkGDCMImageIO.cxx:680:
> error: expected `)' before '{' token
> /usr/include/gdcm/gdcmFile.h: In member function 'virtual void
> itk::GDCMImageIO::Write(const void*)':
> /usr/include/gdcm/gdcmFile.h:192: error: 'gdcm::File::File()' is protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:800:
> error: within this context
> /usr/include/gdcm/gdcmFileHelper.h:187: error:
> 'gdcm::FileHelper::FileHelper(gdcm::File*)' is protected
> /home/wsales/head/InsightToolkit- 3.4.0/Code/IO/itkGDCMImageIO.cxx:801:
> error: within this context
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:826:
> error: no matching function for call to 'gdcm::Dict::GetEntry(const
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
> /usr/include/gdcm/gdcmDict.h:70: note: candidates are: gdcm::DictEntry*
> gdcm::Dict::GetEntry(uint16_t, uint16_t)
> /usr/include/gdcm/gdcmDict.h:71: note:                 gdcm::DictEntry*
> gdcm::Dict::GetEntry(const gdcm::TagKey&)
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:839:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:855:
> error: 'class gdcm::File' has no member named 'InsertBinEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:906:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:910:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:917:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:924:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:932:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:948:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:958:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1036:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1037:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1038:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1039:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1043:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1059:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1060:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1061:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1062:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1063:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1065:
> error: 'class gdcm::File' has no member named 'InsertValEntry'
> /usr/include/gdcm/gdcmFileHelper.h:188: error: 'virtual
> gdcm::FileHelper::~FileHelper()' is protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1100:
> error: within this context
> /usr/include/gdcm/gdcmFile.h:193: error: 'virtual gdcm::File::~File()' is
> protected
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1101:
> error: within this context
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx: In static
> member function 'static bool itk::GDCMImageIO::GetLabelFromTag(const
> std::string&, std::string&)':
> /home/wsales/head/InsightToolkit-3.4.0/Code/IO/itkGDCMImageIO.cxx:1229:
> error: no matching function for call to 'gdcm::Dict::GetEntry(const
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
> /usr/include/gdcm/gdcmDict.h:70: note: candidates are: gdcm::DictEntry*
> gdcm::Dict::GetEntry(uint16_t, uint16_t)
> /usr/include/gdcm/gdcmDict.h:71: note:                 gdcm::DictEntry*
> gdcm::Dict::GetEntry(const gdcm::TagKey&)
> make[2]: *** [Code/IO/CMakeFiles/ITKIO.dir/itkGDCMImageIO.o] Error 1
> make[1]: *** [Code/IO/CMakeFiles/ITKIO.dir/all] Error 2
> make: *** [all] Error 2
>
> The expected file gdcmValEntry.h aren't delivered with current version of
> GDCM.

Hi Wagner,

  Unfortunately you cannot use anything after the 1.2 branch, since
1.3 is not backward compatible with 1.2 (this is the reason I had to
manually merge most of 1.3 bug back to 1.2 branch). You should be able
to take the lastest from the 1.2 branch (CVS branch name: Version1_2)
and it does AFAIK contains all bug patch from the main CVS.

  If for some reason you have to use gdcm 1.3 and up, please note that
the gdcm namespace is configurable, therefore you'll be able to link
both a gdcm1.2 (coming from ITK) and a gdcm CVS/1.3 together.

Let me know if you any further question,

-- 
Mathieu
Ps: I'll document this issue in the CMakeLists/OPTION


More information about the Insight-users mailing list