Cannot open input file 'QVTK.lib'



  • I get this error while trying to compile ITK libraries in QT. Though the path to the lib are correct. It is showing this error. It would be great if some could guide me through this problem. I have attached my pro file herewith

    @

    #-------------------------------------------------

    Project created by QtCreator 2013-09-18T14:03:47

    #-------------------------------------------------

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = ImageRegistration
    TEMPLATE = app

    LIBS+=-L/C:/Toolkits/vtk-5.10/bin/bin/Release/
    -lQVTK
    -lvtkalglib
    -lvtkCharts
    -lvtkCommon
    -lvtkDICOMParser
    -lvtkexoIIc
    -lvtkexpat
    -lvtkFiltering
    -lvtkfreetype
    -lvtkftgl
    -lvtkGenericFiltering
    -lvtkGeovis
    -lvtkGraphics
    -lvtkhdf5_hl
    -lvtkhdf5
    -lvtkHybrid
    -lvtkImaging
    -lvtkInfovis
    -lvtkIO
    -lvtkjpeg
    -lvtklibxml2
    -lvtkmetaio
    -lvtkNetCDF_cxx
    -lvtkNetCDF
    -lvtkpng
    -lvtkproj4
    -lvtkRendering
    -lvtksqlite
    -lvtksys
    -lvtktiff
    -lvtkverdict
    -lvtkViews
    -lvtkVolumeRendering
    -lvtkWidgets
    -lvtkzlib

    INCLUDEPATH+=C:/Toolkits/vtk-5.10/include/vtk-5.10
    DEPENDPATH+=C:/Toolkits/vtk-5.10/include/vtk-5.10

    LIBS += -L/C:/Toolkits/itk-4.4.2/lib/
    -lITKVtkGlue-4.4
    -lITKBiasCorrection-4.4
    -lITKBioCell-4.4
    -lITKCommon-4.4
    -lITKDICOMParser-4.4
    -litkdouble-conversion-4.4
    -lITKEXPAT-4.4
    -lITKFEM-4.4
    -litkgdcmCommon-4.4
    -litkgdcmDICT-4.4
    -litkgdcmDSED-4.4
    -litkgdcmIOD-4.4
    -litkgdcmjpeg8-4.4
    -litkgdcmjpeg12-4.4
    -litkgdcmjpeg16-4.4
    -litkgdcmMSFF-4.4
    -litkgdcmuuid-4.4
    -lITKgiftiio-4.4
    -litkhdf5_cpp-4.4
    -litkhdf5-4.4
    -lITKIOBioRad-4.4
    -lITKIOBMP-4.4
    -lITKIOCSV-4.4
    -lITKIOGDCM-4.4
    -lITKIOGE-4.4
    -lITKIOGIPL-4.4
    -lITKIOHDF5-4.4
    -lITKIOImageBase-4.4
    -lITKIOIPL-4.4
    -lITKIOJPEG-4.4
    -lITKIOLSM-4.4
    -lITKIOMesh-4.4
    -lITKIOMeta-4.4
    -lITKIONIFTI-4.4
    -lITKIONRRD-4.4
    -lITKIOPNG-4.4
    -lITKIOSiemens-4.4
    -lITKIOSpatialObjects-4.4
    -lITKIOStimulate-4.4
    -lITKIOTIFF-4.4
    -lITKIOTransformBase-4.4
    -lITKIOTransformHDF5-4.4
    -lITKIOTransformInsightLegacy-4.4
    -lITKIOTransformMatlab-4.4
    -lITKIOVTK-4.4
    -lITKIOXML-4.4
    -litkjpeg-4.4
    -lITKKLMRegionGrowing-4.4
    -lITKLabelMap-4.4
    -lITKMesh-4.4
    -lITKMetaIO-4.4
    -litkNetlibSlatec-4.4
    -lITKniftiio-4.4
    -lITKNrrdIO-4.4
    -litkopenjpeg-4.4
    -lITKOptimizers-4.4
    -lITKOptimizersv4-4.4
    -lITKPath-4.4
    -litkpng-4.4
    -lITKPolynomials-4.4
    -lITKQuadEdgeMesh-4.4
    -lITKReview-4.4
    -lITKSpatialObjects-4.4
    -lITKStatistics-4.4
    -litksys-4.4
    -litktiff-4.4
    -litkv3p_lsqr-4.4
    -litkv3p_netlib-4.4
    -litkvcl-4.4
    -lITKVideoCore-4.4
    -lITKVideoIO-4.4
    -litkvnl_algo-4.4
    -litkvnl-4.4
    -lITKVNLInstantiation-4.4
    -lITKVTK-4.4
    -lITKWatersheds-4.4
    -litkzlib-4.4
    -lITKznz-4.4

    INCLUDEPATH+= C:/Toolkits/itk-4.4.2/include/ITK-4.4
    DEPENDPATH+= C:/Toolkits/itk-4.4.2/include/ITK-4.4

    LIBS += -L/C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/macos/
    -lboost_filesystem
    -lboost_system
    -lhdf5
    -lhdf5_cpp
    -lscilscore
    -lscilsdomainmodel
    -lscilsgenericio
    -lscilshdf5io
    -llibz

    INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/boost
    DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/boost

    INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/scils
    DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/scils

    INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5
    DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5

    INCLUDEPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5-static
    DEPENDPATH+=C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/hdf5-static

    INCLUDEPATH+=$$PWD

    SOURCES += main.cpp
    ImageRegistrationImplementation.cpp
    listWidget.cpp
    overlayview.cpp
    transforms.cpp
    model.cpp
    imageviewer.cpp

    HEADERS += ImageRegistrationImplementation.h
    listWidget.h
    overlayview.h
    transforms.h
    model.h
    imageviewer.h

    FORMS += ImageRegistration.ui

    @


  • Lifetime Qt Champion

    Hi,

    Are you sure you are pointing LIBS to the folder where QVTK.lib can be found ?



  • Hi,
    Thank you so much for response,yes... Its very strange. When I copy the libs to the folder where I have the pro file and give the full path like

    @

    LIBS+=lC:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/VTKlib/QVTK

    @

    It seems to be fine. But I am not sure why is this happening, as I found even after copying into the new folder if I use the following. I again get the same error.

    @

    LIBS+=L/C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/VTKlib/
    -lQVTK

    @

    It disappears if I use as, but I am not sure if its correct way of doing it

    @

    LIBS+=-L/C:/Users/Venky/Desktop/Image_Registration_Files/ImageRegistration/VTKlib/
    -LQVTK

    @
    .. But even then I stumble upon. Something completely different error something like below.I am not sure whats wrong happening

    @

    Creating library release\ImageRegistration.lib and object release\ImageRegistration.exp
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCreateKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegDeleteValueA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegOpenKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegQueryValueExA referenced in function "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl itksys::SystemTools::GetOperatingSystemNameAndVersion(void)" (?GetOperatingSystemNameAndVersion@SystemTools@itksys@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegSetValueExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
    release\ImageRegistration.exe : fatal error LNK1120: 6 unresolved externals

    @


  • Lifetime Qt Champion

    What compiler are you using ? What compiler was used to build ITK/VTK ?



  • I am using Visual c++ compiler 11 AMD64. I compiled ITK and VTK using VS 2012 in Release Mode in 64bit, and built install. I compiled Qt from same VS 2012 from source (4.8.3)



  • I used CMake to generate make files using Visual Studio11 64 for ITK and VTK using option use "default native compilers"



  • Hi,
    I tried to find the problem. I am again stuck with some errors like

    @

    link /LIBPATH:"c:\Qt\Qt4.8.3\lib" /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /OUT:release\ImageRegistration.exe @C:\Users\Venky\AppData\Local\Temp\ImageRegistration.exe.644.2485.jom
    Creating library release\ImageRegistration.lib and object release\ImageRegistration.exp
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_GetStockObject referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_SendMessageA referenced in function "protected: static void __cdecl itk::Win32OutputWindow::AddText(char const *)" (?AddText@Win32OutputWindow@itk@@KAXPEBD@Z)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcA referenced in function "public: static __int64 cdecl itk::Win32OutputWindow::WndProc(struct HWND *,unsigned int,unsigned __int64,int64)" (?WndProc@Win32OutputWindow@itk@@SA_JPEAUHWND@@I_K_J@Z)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_GetClassInfoA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function "protected: virtual __cdecl itk::Win32OutputWindow::~Win32OutputWindow(void)" (??1Win32OutputWindow@itk@@MEAA@XZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    ITKCommon-4.4.lib(itkWin32OutputWindow.obj) : error LNK2019: unresolved external symbol __imp_LoadIconA referenced in function "protected: static int __cdecl itk::Win32OutputWindow::Initialize(void)" (?Initialize@Win32OutputWindow@itk@@KAHXZ)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegCreateKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegDeleteValueA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegOpenKeyExA referenced in function "public: static bool __cdecl itksys::SystemTools::DeleteRegistryValue(char const *,enum itksys::SystemTools::KeyWOW64)" (?DeleteRegistryValue@SystemTools@itksys@@SA_NPEBDW4KeyWOW64@12@@Z)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegQueryValueExA referenced in function "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl itksys::SystemTools::GetOperatingSystemNameAndVersion(void)" (?GetOperatingSystemNameAndVersion@SystemTools@itksys@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
    itksys-4.4.lib(SystemTools.obj) : error LNK2019: unresolved external symbol __imp_RegSetValueExA referenced in function "public: static bool __cdecl itksys::SystemTools::WriteRegistryValue(char const *,char const *,enum itksys::SystemTools::KeyWOW64)" (?WriteRegistryValue@SystemTools@itksys@@SA_NPEBD0W4KeyWOW64@12@@Z)
    release\ImageRegistration.exe : fatal error LNK1120: 18 unresolved externals
    jom: C:\Users\Venky\Desktop\Image_Registration_Files\build-ImageRegistration-Desk2-Release\Makefile.Release [release\ImageRegistration.exe] Error 1120
    jom: C:\Users\Venky\Desktop\Image_Registration_Files\build-ImageRegistration-Desk2-Release\Makefile [release] Error 2
    14:21:41: The process "C:\Qt\qtcreator-2.8.1\bin\jom.exe" exited with code 2.
    Error while building/deploying project ImageRegistration (kit: Desk2)
    When executing step 'Make'

    @

    I guess the problem is with two libs itksys and itkCommon. But both of it is in my lib. I couldn't find the reason for this problem..


  • Lifetime Qt Champion

    Then check whether both libraries are built with a similar set of flags, specially wchar_t should have the same values



  • Hi,
    Thanks but how to check the flags of the build ?? Should I build ITK again and check for the values in CMake ??


  • Lifetime Qt Champion

    Look at the configuration files



  • Hi,
    for all the libs. The wchar_t is build with 1.I found it in CMakecache. I am not sure whether it is the mistake. I also checked with same code in another system with Qt. I get the same error. But when using code with itk libs works. I am confused whether the problem lies somewhere else...


  • Lifetime Qt Champion

    Then configure all three libraries to use the same setting with wchar_t


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.