[Insight-users] Linking to the itkgdcm.lib error!
Jingfei.Hu@gmail.com
jingfei.hu at gmail.com
Thu Sep 24 11:55:20 EDT 2009
John, Thanks for your time and suggestion. The itkgdcm.lib would be
generated only if I set it up with CMake. Is that right? The compiler is
Microsoft Visual Studio 2008 all the time. So is there any special
options about GDCM which I should set it up with CMake?
Thanks, John.
Hu Jingfei
On Thu, 2009-09-24 at 09:38 -0400, John Drescher wrote:
> 2009/9/24 HuJingfei <jingfei.hu at gmail.com>:
> > Hi, ITK's developers, I am a newbie to the ITK. I have asked the
same
> > question before, but no one answered me. So I post it again, hoping
somebody
> > can help me out.
> >
> > I encountered a common problem. And I first state the context.
> >
> > Environment:
> >
> > s OS: Windows Vista Home Premium
> >
> > s Compiler: Microsoft Visual Studio 2008
> >
> > s ITK Version: 3.16
> >
> > Everything is fine when compiling and building the ITK. And I
install the
> > ITK by building the INSTALL project.
> >
> > Then I begin to test Examples\Registration
\ImageRegistration1.cxx.After
> > adding the necessary including files, the ImageRegistration1.cxx
compiles
> > successfully.
> >
> > But when I run it, it throws following linking errors:
> >
> > itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved symbol
> > _SnmpUtilVarBindFree at 4,this symbol is invoked in method "int
__cdecl
> > gdcm::GetMacAddrSys(unsigned char
*)" (?GetMacAddrSys at gdcm@@YAHPAE at Z)
> >
> > Some similar error messages omitted...
> >
> > So I look up the CMakeLists.txt under Utilities/gdcm/src and I find
such
> > codes:
> >
> > IF(WIN32)
> >
> > IF(NOT BORLAND)
> >
> > # rpcrt4 -> UuidCreate
> >
> > TARGET_LINK_LIBRARIES(itkgdcm wsock32 snmpapi rpcrt4)
> >
> > ENDIF(NOT BORLAND)
> >
> > ENDIF(WIN32)
> >
> >
> >
> > It looks like that the code snippet does not work. So anybody know
the
> > reason and how to fix it?
> >
>
> Did you build GDCM from source setting it up with CMake and building
> it with the same compiler that you are compiling itk?
>
> John
More information about the Insight-users
mailing list