Search code examples
c++librariesitk

compilation unresolved external symbol gdcm::system::getHostName etc


I am making a c++ project using ITK (via the .lib of itk). on qmake, I make the link with ITK libraries like that: in the .pri:

MyITK {
CONFIG_FOUND += MyITK
QMAKE_LIBDIR += $${PACKAGE_LIB}/MyITK
win32:LIBS += ITKBiasCorrection-4.13.lib \
ITKIOImageBase-4.13.lib \
ITKNrrdIO-4.13.lib \
itkgdcmMSFF-4.13.lib
etc \

and in the .pro: CONFIG += MyITK

the link with itk seems to work but I have a compilation error:

LINK2019 unresolved external symbol gdcm::system::getHostName error message after research it seems that it could be linked to the fact that I should add in qmake the libs: Snmpapi.lib Ws2_32.lib Rpcrt4.lib and psapi.lib but I don't know where to find them. I don't find them on my computer.

I am working on windows 7, using visual studio 2015.

Regards,


Solution

  • You need to install WinSDK 8.1 or later. All of the said files are in C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64\on my computer.