[vtkusers] [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008

Jafari, Kourosh kjafari at rad.hfh.edu
Sun Jun 26 21:02:39 EDT 2011


Hello John,

Do you use ITK and GDCM in Visual Studio? I have faced the following link error and was wondering if you experienced the same problem.

Thanks a lot!
Kourosh

________________________________________
From: Dean Inglis [dean.inglis at camris.ca]
Sent: Sunday, June 26, 2011 8:41 PM
To: Jafari, Kourosh; insight-users at itk.org
Cc: vtkusers at vtk.org; gdcm-developers
Subject: Re: [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008

that seems like an error to me!  I build against static tcl because i am
still using
KWWidgets for some projects I run, however, seems like those cache vars
would
have nothing to do with tcl/tk wrapping.  I hope Kitware can help on this
one
for you and the rest of us!

----- Original Message -----
From: "Jafari, Kourosh" <kjafari at rad.hfh.edu>
To: "Dean Inglis" <dean.inglis at camris.ca>; <insight-users at itk.org>
Cc: <vtkusers at vtk.org>; "gdcm-developers"
<gdcm-developers at lists.sourceforge.net>
Sent: Sunday, June 26, 2011 7:50 PM
Subject: RE: [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008


Thanks Dean!

I turned ITK_USE_SYSTEM_GDCM on for ITK but got the following error:

Could NOT find Tclsh  (missing:  TCL_TCLSH)
CMake Error at Utilities/MetaIO/CMakeLists.txt:115 (INSTALL):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "vtkmetaio".

Configuring incomplete, errors occurred!

I got some information on the web about the above error but it was not
useful. I do not know if this is a bug or something that I can fix myself.
Any idea how to fix it?

Thanks!
Kourosh


________________________________________
From: Dean Inglis [dean.inglis at camris.ca]
Sent: Sunday, June 26, 2011 4:19 PM
To: Jafari, Kourosh; insight-users at itk.org
Cc: vtkusers at vtk.org; gdcm-developers
Subject: Re: [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008

Hi

I set

ITK_USE_SYSTEM_GDCM:BOOL=ON

and when I build ITK, VTK and GDCM, I set the cmake cache files for
all of the builds to have the install dir the same for the install cache
entry:

CMAKE_INSTALL_PREFIX:PATH

 No problems with VS 2010 on Win7 static release builds (nmake),  latest ITK
official
 release and gdcm and vtk current git.

Dean


----- Original Message -----
From: "Jafari, Kourosh" <kjafari at rad.hfh.edu>
To: <insight-users at itk.org>
Cc: <vtkusers at vtk.org>; "gdcm-developers"
<gdcm-developers at lists.sourceforge.net>
Sent: Sunday, June 26, 2011 12:24 PM
Subject: Re: [Gdcm2] Link error for ITK+VTK+GDCM+QT in Visual Studio 2008


> Hello,
>
> Has anybody experienced link error (... already defined in ...) when using
> ITK and GDCM as described below?
>
> Thanks!
> Kourosh
>
> ________________________________________
> From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] On
> Behalf Of Jafari, Kourosh [kjafari at rad.hfh.edu]
> Sent: Thursday, June 23, 2011 11:23 PM
> To: insight-users at itk.org
> Cc: gdcm-developers
> Subject: Link error for ITK+VTK+GDCM+QT in Visual Studio 2008
>
> Dear all,
>
> I have used ITK+VTK+QT in visual studio 2008 and so far it has worked
> fine. I have added GDCM and got the following errors. Has anybody had this
> experience? I use ITK 3.20.0, VTK 5.6.0, QT 4.7.1, and GDCM 2.0.14. I had
> previously had link problems with GDCM 2.0.17 and that is why I switched
> to 2.0.14. The following errors appear to be a conflict between ITK and
> GDCM.
>
> Thanks a lot!
> Kourosh
>
>
> 1>------ Build started: Project: DentalImplant, Configuration: Release
> Win32 ------
> 1>Linking...
> 1>gdcmMSFF.lib(gdcmPixmapReader.obj) : error LNK2005: "public: __thiscall
> gdcm::File::File(void)" (??0File at gdcm@@QAE at XZ) already defined in
> itkgdcm.lib(gdcmFile.obj)
> 1>gdcmMSFF.lib(gdcmPixmapReader.obj) : error LNK2005: "public: virtual
> __thiscall gdcm::File::~File(void)" (??1File at gdcm@@UAE at XZ) already defined
> in itkgdcm.lib(gdcmFile.obj)
> 1>gdcmDICT.lib(gdcmDicts.obj) : error LNK2005: "public: __thiscall
> gdcm::Dict::Dict(void)" (??0Dict at gdcm@@QAE at XZ) already defined in
> itkgdcm.lib(gdcmDict.obj)
> 1>gdcmDICT.lib(gdcmGlobal.obj) : error LNK2005: "public: __thiscall
> gdcm::Global::Global(void)" (??0Global at gdcm@@QAE at XZ) already defined in
> itkgdcm.lib(gdcmGlobal.obj)
> 1>gdcmDICT.lib(gdcmGlobal.obj) : error LNK2005: "public: __thiscall
> gdcm::Global::~Global(void)" (??1Global at gdcm@@QAE at XZ) already defined in
> itkgdcm.lib(gdcmGlobal.obj)
> 1>gdcmopenjpeg.lib(j2k.obj) : error LNK2005: _j2k_dec_mstab already
> defined in itkopenjpeg.lib(j2k.obj)
> 1>   Creating library
> C:\Users\Kourosh\Research\Softwares\Toolkit\MyCodes\DentalImplant\Release\DentalImplant.lib
> and object
> C:\Users\Kourosh\Research\Softwares\Toolkit\MyCodes\DentalImplant\Release\DentalImplant.exp
> 1>C:\Users\Kourosh\Research\Softwares\Toolkit\MyCodes\DentalImplant\Release\DentalImplant.exe
> : fatal error LNK1169: one or more multiply defined symbols found
> 1>Build log was saved at
> "file://c:\Users\Kourosh\Research\Softwares\Toolkit\MyCodes\DentalImplant\DentalImplant.dir\Release\BuildLog.htm"
> 1>DentalImplant - 7 error(s), 0 warning(s)
> 2>------ Skipped Build: Project: ALL_BUILD, Configuration: Release
> Win32 ------
> 2>Project not selected to build for this solution configuration
> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1 skipped
> ==========
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gdcm-developers mailing list
> Gdcm-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gdcm-developers=


More information about the vtkusers mailing list