Error while link ITK and VTK libraries to QT

I want to develop image processing and visualization software. So i tried to integrate vtk and itk to qt and used msvc2015 compiler. Unfortunately there is an error occurred while link libraries of itk to Qt.The complete error given below.

itksys-5.2.lib(SystemTools.obj): -1: error: LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function “public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(class std:<:basic_string): :char_traits,class std::allocator > const &,enum itksys::SystemTools::KeyWOW64)” (?DeleteRegistryValue@SystemTools@itksys@@SA_NAEBV?$basic_string@DU?$char_traits@D@std@V? @D@2@@std@@W4KeyWOW64@12@@Z)

But the lib itksys-5.2.lib is existing in the .pro file. See the qt .pro file details given below.

QT       += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += 
ImageView.cpp 
config.cpp 
main.cpp 
mainwindow.cpp 
test.cpp 
threedview.cpp 
vtkintersctorstylecustome.cpp 
widget.cpp
HEADERS += 
ImageView.h 
config.h 
mainwindow.h 
test.h 
threedview.h 
vtkincludes.h 
vtkintersctorstylecustome.h 
widget.h
FORMS += 
mainwindow.ui 
widget.ui

win32 
{
   INCLUDEPATH += $$quote("C:/Program Files/VTK/include/vtk-8.1")
   CONFIG(debug, debug|release ) 
   {
   } 
   else 
   {

    QMAKE_LIBDIR += "C:/Program Files/VTK/lib"
    LIBS += 
    -lvtkalglib-8.1 
    -lvtkChartsCore-8.1 
    -lvtkCommonColor-8.1 
    -lvtkCommonComputationalGeometry-8.1 
    -lvtkCommonCore-8.1 
    -lvtkCommonDataModel-8.1 
    -lvtkCommonExecutionModel-8.1 
    -lvtkCommonMath-8.1 
    -lvtkCommonMisc-8.1 
    -lvtkCommonSystem-8.1 
    -lvtkCommonTransforms-8.1 
    -lvtkDICOM-8.1 
    -lvtkDICOMParser-8.1 
    -lvtkDomainsChemistry-8.1 
    -lvtkDomainsChemistryOpenGL2-8.1 
    -lvtkexoIIc-8.1 
    -lvtkexpat-8.1 
    -lvtkFiltersAMR-8.1 
    -lvtkFiltersCore-8.1 
    -lvtkFiltersExtraction-8.1 
    -lvtkFiltersFlowPaths-8.1 
    -lvtkFiltersGeneral-8.1 
    -lvtkFiltersGeneric-8.1 
    -lvtkFiltersGeometry-8.1 
    -lvtkFiltersHybrid-8.1 
    -lvtkFiltersHyperTree-8.1 
    -lvtkFiltersImaging-8.1 
    -lvtkFiltersModeling-8.1 
    -lvtkFiltersParallel-8.1 
    -lvtkFiltersParallelImaging-8.1 
    -lvtkFiltersPoints-8.1 
    -lvtkFiltersProgrammable-8.1 
    -lvtkFiltersSelection-8.1 
    -lvtkFiltersSMP-8.1 
    -lvtkFiltersSources-8.1 
    -lvtkFiltersStatistics-8.1 
    -lvtkFiltersTexture-8.1 
    -lvtkFiltersTopology-8.1 
    -lvtkFiltersVerdict-8.1 
    -lvtkfreetype-8.1 
    -lvtkGeovisCore-8.1 
    -lvtkgl2ps-8.1 
    -lvtkglew-8.1 
    -lvtkGUISupportQt-8.1 
    -lvtkGUISupportQtOpenGL-8.1 
    -lvtkGUISupportQtSQL-8.1 
    -lvtkhdf5_hl-8.1 
    -lvtkhdf5-8.1 
    -lvtkImagingColor-8.1 
    -lvtkImagingCore-8.1 
    -lvtkImagingFourier-8.1 
    -lvtkImagingGeneral-8.1 
    -lvtkImagingHybrid-8.1 
    -lvtkImagingMath-8.1 
    -lvtkImagingMorphological-8.1 
    -lvtkImagingOpenGL2-8.1 
    -lvtkImagingSources-8.1 
    -lvtkImagingStatistics-8.1 
    -lvtkImagingStencil-8.1 
    -lvtkInfovisCore-8.1 
    -lvtkInfovisLayout-8.1 
    -lvtkInteractionImage-8.1 
    -lvtkInteractionStyle-8.1 
    -lvtkInteractionWidgets-8.1 
    -lvtkIOAMR-8.1 
    -lvtkIOCore-8.1 
    -lvtkIOEnSight-8.1 
    -lvtkIOExodus-8.1 
    -lvtkIOExport-8.1 
    -lvtkIOExportOpenGL2-8.1 
    -lvtkIOGeometry-8.1 
    -lvtkIOImage-8.1 
    -lvtkIOImport-8.1 
    -lvtkIOInfovis-8.1 
    -lvtkIOLegacy-8.1 
    -lvtkIOLSDyna-8.1 
    -lvtkIOMINC-8.1 
    -lvtkIOMovie-8.1 
    -lvtkIONetCDF-8.1 
    -lvtkIOParallel-8.1 
    -lvtkIOParallelXML-8.1 
    -lvtkIOPLY-8.1  
    -lvtkIOSQL-8.1  
    -lvtkIOTecplotTable-8.1 
    -lvtkIOVideo-8.1 
    -lvtkIOXML-8.1 
    -lvtkIOXMLParser-8.1 
    -lvtkjpeg-8.1 
    -lvtkjsoncpp-8.1 
    -lvtklibharu-8.1 
    -lvtklibxml2-8.1 
    -lvtklz4-8.1 
    -lvtkmetaio-8.1 
    -lvtkNetCDF-8.1 
    -lvtkoggtheora-8.1 
    -lvtkParallelCore-8.1 
    -lvtkpng-8.1 
    -lvtkproj4-8.1 
    -lvtkRenderingAnnotation-8.1 
    -lvtkRenderingContext2D-8.1 
    -lvtkRenderingContextOpenGL2-8.1 
    -lvtkRenderingCore-8.1 
    -lvtkRenderingFreeType-8.1 
    -lvtkRenderingGL2PSOpenGL2-8.1 
    -lvtkRenderingImage-8.1 
    -lvtkRenderingLabel-8.1 
    -lvtkRenderingLOD-8.1 
    -lvtkRenderingOpenGL2-8.1 
    -lvtkRenderingQt-8.1 
    -lvtkRenderingVolume-8.1 
    -lvtkRenderingVolumeOpenGL2-8.1 
    -lvtksqlite-8.1 
    -lvtksys-8.1 
    -lvtktiff-8.1 
    -lvtkverdict-8.1 
    -lvtkViewsContext2D-8.1 
    -lvtkViewsCore-8.1 
    -lvtkViewsInfovis-8.1 
    -lvtkViewsQt-8.1 
    -lvtkzlib-8.1   
   }
 }
 qnx: target.path = /tmp/$${TARGET}/bin
 else:
   unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES +=  Icon.qrc

win32 
{
   INCLUDEPATH += $$quote("C:/Program Files/ITK/include/ITK-5.2")
   CONFIG(debug, debug|release ) 
   {
   } 
   else 
   {
     QMAKE_LIBDIR += "C:/Program Files/ITK/lib"
     LIBS += 
     -litksys-5.2
     -lITKBiasCorrection-5.2
     -lITKColormap-5.2
     -lITKCommon-5.2
     -lITKConvolution-5.2
     -lITKDeformableMesh-5.2
     -lITKDenoising-5.2
     -lITKDICOMParser-5.2
     -lITKDiffusionTensorImage-5.2
     -litkdouble-conversion-5.2
     -lITKEXPAT-5.2
     -lITKFastMarching-5.2
     -lITKFFT-5.2
     -litkgdcmcharls-5.2
     -litkgdcmCommon-5.2
     -litkgdcmDICT-5.2
     -litkgdcmDSED-5.2
     -litkgdcmIOD-5.2
     -litkgdcmjpeg8-5.2
     -litkgdcmjpeg12-5.2
     -litkgdcmjpeg16-5.2
     -litkgdcmMEXD-5.2
     -litkgdcmMSFF-5.2
     -litkgdcmopenjp2-5.2
     -litkgdcmsocketxx-5.2
     -lITKgiftiio-5.2
     -litkhdf5_cpp-shared-5.2
     -litkhdf5-shared-5.2
     -lITKImageFeature-5.2
     -lITKImageIntensity-5.2
     -lITKIOBioRad-5.2
     -lITKIOBMP-5.2
     -lITKIOBruker-5.2
     -lITKIOBruker-5.2
     -lITKIOGDCM-5.2
     -lITKIOGE-5.2
     -lITKIOGIPL-5.2
     -lITKIOGIPL-5.2
     -lITKIOImageBase-5.2
     -lITKIOIPL-5.2
     -lITKIOIPL-5.2
     -lITKIOIPL-5.2
     -lITKIOIPL-5.2
     -lITKIOIPL-5.2
     -lITKIOMeshBYU-5.2
     -lITKIOMeshFreeSurfer-5.2
     -lITKIOMeshGifti-5.2
     -lITKIOMeshOBJ-5.2
     -lITKIOMeshOFF-5.2
     -lITKIOMeshVTK-5.2
     -lITKIOMeta-5.2
     -lITKIOMINC-5.2
     -lITKIOMRC-5.2
     -lITKIONIFTI-5.2
     -lITKIONRRD-5.2
     -lITKIOPNG-5.2
     -lITKIOSiemens-5.2
     -lITKIOSpatialObjects-5.2
     -lITKIOStimulate-5.2
     -lITKIOTIFF-5.2
     -lITKIOTransformBase-5.2
     -lITKIOTransformHDF5-5.2
     -lITKIOTransformInsightLegacy-5.2
     -lITKIOTransformMatlab-5.2
     -lITKIOVTK-5.2
     -lITKIOXML-5.2
     -litkjpeg-5.2
     -lITKKLMRegionGrowing-5.2
     -lITKLabelMap-5.2
     -litklbfgs-5.2
     -lITKMarkovRandomFieldsClassifiers-5.2
     -lITKMathematicalMorphology-5.2
     -lITKMesh-5.2
     -lITKMetaIO-5.2
     -litkminc2-5.2
     -litkNetlibSlatec-5.2
     -lITKniftiio-5.2
     -lITKNrrdIO-5.2
     -litkopenjpeg-5.2
     -lITKOptimizers-5.2
     -lITKOptimizersv4-5.2
     -lITKPath-5.2
     -lITKPDEDeformableRegistration-5.2
     -litkpng-5.2
     -lITKPolynomials-5.2
     -lITKQuadEdgeMesh-5.2
     -lITKQuadEdgeMeshFiltering-5.2
     -lITKRegionGrowing-5.2
     -lITKRegistrationMethodsv4-5.2
     -lITKSmoothing-5.2
     -lITKSpatialObjects-5.2
     -lITKStatistics-5.2
     -lITKTestKernel-5.2
     -litktestlib-5.2
     -litktiff-5.2
     -lITKTransform-5.2
     -lITKTransformFactory-5.2
     -litkv3p_netlib-5.2
     -litkvcl-5.2
     -lITKVideoCore-5.2
     -lITKVideoIO-5.2
     -litkvnl_algo-5.2
     -litkvnl-5.2
     -lITKVNLInstantiation-5.2
     -lITKVTK-5.2
     -lITKWatersheds-5.2
     -litkzlib-5.2
     -lITKznz-5.2
    }
  }

I tried many ways to sort out the issue. But it still exists. Any body please help me to sort out the issues.

Thanks in advance

Deepak Murali

Leave a Comment