[Insight-users] GDCM 2.0 with ITK 3.16.0

Yang, Jinzhong jinzhong76 at gmail.com
Tue Sep 11 13:27:25 EDT 2012


Hi All,

 

My project needs both GDCM 2.0 and ITK 3.16.0. The ITK 3.16.0 was built
before GDCM 2.0 was built on the computer. When I compiled my project, the
GDCM 2.0 conflicts with the build-in GDCM in ITK. Below is error message:

 

1>d:\insighttoolkit-3.16.0\source\utilities\gdcm\src\gdcmCommon.h(225) :
error C2990: 'gdcm::Element' : non-class template has already been declared
as a class template

1>
d:\gdcm-2.2.0\source\source\datastructureandencodingdefinition\gdcmElement.h
(50) : see declaration of 'gdcm::Element'

1>D:\InsightToolkit-3.16.0\source\Utilities\gdcm\src\gdcmException.h(35) :
error C2011: 'gdcm::Exception' : 'class' type redefinition

1>        d:\gdcm-2.2.0\source\source\common\gdcmException.h(33) : see
declaration of 'gdcm::Exception'

1>D:\InsightToolkit-3.16.0\source\Utilities\gdcm\src\gdcmException.h(82) :
error C2504: 'gdcm::Exception' : base class undefined

1>D:\InsightToolkit-3.16.0\source\Utilities\gdcm\src\gdcmException.h(90) :
error C2614: 'gdcm::FileError' : illegal member initialization: 'Exception'
is not a base or member

1>D:\InsightToolkit-3.16.0\source\Utilities\gdcm\src\gdcmException.h(101) :
error C2504: 'gdcm::Exception' : base class undefined

1>D:\InsightToolkit-3.16.0\source\Utilities\gdcm\src\gdcmException.h(107) :
error C2614: 'gdcm::FormatUnexpected' : illegal member initialization:
'Exception' is not a base or member

1>d:\gdcm-2.2.0\source\source\datastructureandencodingdefinition\gdcmParseEx
ception.h(27) : error C2504: 'gdcm::Exception' : base class undefined

 

I tried to rebuild the ITK with "ITK_USE_SYSTEM_GDCM" enabled, but I got the
following error message in CMake:

 

CMake Error at Utilities/MetaIO/CMakeLists.txt:21 (ADD_LIBRARY):

add_library cannot create target "vtkmetaio" because an imported target

with the same name already exists.

CMake Error at Utilities/MetaIO/CMakeLists.txt:67 (TARGET_LINK_LIBRARIES):

Cannot specify link libraries for target "vtkmetaio" which is not built by

this project.

 

Have no idea to work around. Please help.

 

Thanks,

Jinzhong

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120911/d1b8e7de/attachment.htm>


More information about the Insight-users mailing list