Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt deployment



  • I am unable to successfully deploy a C++ application on Windows 10 that was developed on Windows 7 in Visual Studio 2015 using Qt (5.9.1), VTK (8.0) and PCL (1.8.1) libraries. I have included all the Qt dlls and the plugins folder in with the application executable; when I run it on Windows 10 it results in an error, reasons mentioned ntdll.dll or ucrtbase.dll files. I have also tried adding those files to the executable directory, with no success. Without Qt and VTK, the application runs fine on Windows 10. Many thanks for any suggestions in advance.



  • Hi, I solved the problem, I used windeployqt on the executable to generate the required dependencies for deployment. It works now on Windows 10 PC as it did on Windows 7 PC.


  • Moderators

    Hi, and welcome to the Qt Dev Net!

    @Senen said in Qt deployment:

    I am unable to successfully deploy a C++ application on Windows 10 that was developed on Windows 7 in Visual Studio 2015 using Qt (5.9.1), VTK (8.0) and PCL (1.8.1) libraries.

    Questions:

    1. Does your application run correctly when you launch on your Windows 7 PC?
    2. What compiler was used to build Qt?
    3. What compiler was used to build VTK?
    4. What compiler was used to build PCL?

    when I run it on Windows 10 it results in an error

    You didn't tell us what the error is. We cannot help you without this information.



  • Hi,

    My application runs correctly on Windows 7 PC.

    I used Visual Studio 2015 C++ 14.0 to compile VTK (8.0) and PCL (1.8.1) in CMake. For Qt (5.9.1), I used the installer.

    In CMake I set the VTK_DIR path and paths for Qt5Core_DIR, Qt5GUI_DIR, Qt5OpenGL_DIR, Qt5Sql_DIR and Qt5Widgets_DIR and I generate a Visual Studio project for my application.

    To add QT, PCL and VTK I add the following lines in CMakeLists:

    project(name)
    find_package( VTK REQUIRED )
    set( QTDIR $ENV{QTDIR} )
    set( CMAKE_PREFIX_PATH ${QTDIR} )
    find_package( Qt5Widgets REQUIRED )

    set( CMAKE_INCLUDE_CURRENT_DIR ON )
    set( CMAKE_AUTOMOC ON )
    set( CMAKE_AUTORCC ON )

    include(${VTK_USE_FILE}) # include UseVTK.cmake

    QT5_WRAP_CPP( MOC ${project_HEADERS})
    QT5_WRAP_UI( UI_HEADER ${project_FORMS})

    add_executable( name ${project_SOURCES} ${project_HEADERS} ${project_FORMS} mc_resource.qrc )

    include_directories( ${PCL_INCLUDE_DIRS} )
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
    include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
    add_definitions( ${PCL_DEFINITIONS} )

    link_directories( ${PCL_LIBRARY_DIRS} )
    target_link_libraries (name ${PCL_LIBRARIES} ${VTK_LIBRARIES} Qt5::Widgets)

    The executable runs fine on Windows 7 PC and on Windows 10 PC without Qt (I've included the contents of the C:\Qt\5.9.1\msvc2015_64\bin folder and the plugin folder in with the executable).

    The application with Qt crashes on Windows 10 with the following message:

    Problemsignatur:
    Problemereignisname: BEX64
    Anwendungsname: name.exe
    Anwendungsversion: 0.0.0.0
    Anwendungszeitstempel: 5b7acdbc
    Fehlermodulname: ucrtbase.DLL
    Fehlermodulversion: 10.0.14393.2247
    Fehlermodulzeitstempel: 5adc1d0b
    Ausnahmeoffset: 000000000006eabe
    Ausnahmecode: c0000409
    Ausnahmedaten: 0000000000000007
    Zusatzinformation 1: 8634
    Zusatzinformation 2: 863443fc0578332028d0d14e24a12e66
    Zusatzinformation 3: eb6d
    Zusatzinformation 4: eb6ddf323acf9c150b1c43ae35b3dcad

    Thank you in advance and let me know if you need additional information.



  • Hi, I solved the problem, I used windeployqt on the executable to generate the required dependencies for deployment. It works now on Windows 10 PC as it did on Windows 7 PC.


Log in to reply