itk中遇到的问题

1、.\src\main.cpp(4): fatal error C1083: 无法打开包括文件:“itkImageToVTKImageFilter.h”: No such file or directory

使用itk vtk时出现了这个问题,因为我安装时没有安装 InsighApplication,所以在CMake时不会自动的搜索到相应的文件及lib。

解决方案:方法一(推荐)、安装InsighApplication,工程重新编译。

     方法二(方便): 直接在InsighApplication的src下搜索itkImageToVTKImageFilter.h 以及itkImageToVTKImageFilter.txx文件,copy到工程下bin/ITKIOFactoryRegistration文件夹下即可。

 

2.

1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilVarBindFree@4 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys@gdcm@@YAHPAE@Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilOidNCmp@12 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys@gdcm@@YAHPAE@Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilOidCpy@8 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys@gdcm@@YAHPAE@Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys@gdcm@@YAHPAE@Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "private: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl gdcm::Util::GetIPAddress(void)" (?GetIPAddress@Util@gdcm@@CA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _gethostname@8 referenced in function "private: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl gdcm::Util::GetIPAddress(void)" (?GetIPAddress@Util@gdcm@@CA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "private: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl gdcm::Util::GetIPAddress(void)" (?GetIPAddress@Util@gdcm@@CA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)

编译运行时遇到这个问题,itkgdcm.lib问题,首先检查下项目中是否配置itkgdcm.lib

文件,如果配置了需要再配置三个.lib文件,这三个.lib文件时windows sdk中的.lib文件

snmpapi.lib
rpcrt4.lib
wsock32.lib

 原问题解决来自于:http://www.itk.org/pipermail/insight-users/2010-August/037697.html     by    ALBERT Aurélien 

posted on 2013-03-26 08:54  NewPanderKing  阅读(1810)  评论(0)    收藏  举报

导航