Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem in deploying stand-alone executable binary
Forum Updated to NodeBB v4.3 + New Features

Problem in deploying stand-alone executable binary

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 664 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tanmanh0707
    wrote on 28 Jun 2018, 10:04 last edited by
    #1

    Hi all,
    I got a problem in deploying Qt application. I created a default Qt Widgets application with Qt 5.4.1 (MSVC2010, 32 bit) then built and ran it successfully on my PC.
    After that, I need to deploy my application to other PCs which do not have Qt installed: a Window 7 and a Window 10 PC. I created a new folder contains my application binary and all *.dll files needed such as Qt5Core.dll, Qt5Guid.dll, Qt5Widgets.dll. OK, everything seems fine, my application can run independently on my PC.
    I shared above folder to 2 mentioned PCs to check if I can deploy my app. The problem appears as below:

    • Qt Widgets application with DEBUG mode => the deployed PC cannot run the binary with error MSVCR120d.dll is missing. I downloaded that library in the internet and install it to C:/Windows/SysWOW64. The missing file problem was solved but another came. The application is crashed at the time be executed with error The application was unable to start correctly (0xc000007b). Click OK to close the application.

    • Qt Widgets application with RELEASE mode: It seems OK. No need to install other libraries and the application can run successfully.

    • Qt Widgets application with RELEASE mode + using QDomDocument: My application required *.xml parsing/creating. So I add QT += xml to my *.pro file and try to use QDomDocument with a simple line of code QDomDocument doc; Unfortunately, this causes a crash in the non-Qt PC with error The application was unable to start correctly (0xc000007b). Click OK to close the application.

    Please help me a way to deploy my application.

    Thank you very much.

    J 1 Reply Last reply 28 Jun 2018, 11:14
    0
    • T tanmanh0707
      28 Jun 2018, 10:04

      Hi all,
      I got a problem in deploying Qt application. I created a default Qt Widgets application with Qt 5.4.1 (MSVC2010, 32 bit) then built and ran it successfully on my PC.
      After that, I need to deploy my application to other PCs which do not have Qt installed: a Window 7 and a Window 10 PC. I created a new folder contains my application binary and all *.dll files needed such as Qt5Core.dll, Qt5Guid.dll, Qt5Widgets.dll. OK, everything seems fine, my application can run independently on my PC.
      I shared above folder to 2 mentioned PCs to check if I can deploy my app. The problem appears as below:

      • Qt Widgets application with DEBUG mode => the deployed PC cannot run the binary with error MSVCR120d.dll is missing. I downloaded that library in the internet and install it to C:/Windows/SysWOW64. The missing file problem was solved but another came. The application is crashed at the time be executed with error The application was unable to start correctly (0xc000007b). Click OK to close the application.

      • Qt Widgets application with RELEASE mode: It seems OK. No need to install other libraries and the application can run successfully.

      • Qt Widgets application with RELEASE mode + using QDomDocument: My application required *.xml parsing/creating. So I add QT += xml to my *.pro file and try to use QDomDocument with a simple line of code QDomDocument doc; Unfortunately, this causes a crash in the non-Qt PC with error The application was unable to start correctly (0xc000007b). Click OK to close the application.

      Please help me a way to deploy my application.

      Thank you very much.

      J Offline
      J Offline
      JonB
      wrote on 28 Jun 2018, 11:14 last edited by JonB
      #2

      @tanmanh0707
      The initial answer to this kind of question is: why are you not using windeployqt (http://doc.qt.io/qt-5/windows-deployment.html) for deployment?

      T 1 Reply Last reply 2 Jul 2018, 02:51
      3
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 29 Jun 2018, 18:06 last edited by
        #3

        Hi
        And also besides using the tool as @JonB says.
        Read this also.
        http://www.tripleboot.org/?p=138

        The app needs a deployment folder. with right structured and the needed DLLS. The DLLS are different from debug to release so dont mix.
        The debug verson has a d in name Qt5Guid.dll.

        Both mingw and visual stud compiler might need its runtime files if say win 7. Sometimes it can be found in system.

        1 Reply Last reply
        4
        • J JonB
          28 Jun 2018, 11:14

          @tanmanh0707
          The initial answer to this kind of question is: why are you not using windeployqt (http://doc.qt.io/qt-5/windows-deployment.html) for deployment?

          T Offline
          T Offline
          tanmanh0707
          wrote on 2 Jul 2018, 02:51 last edited by
          #4

          @JonB @mrjj Thank you very much for sharing. I used windeployqt and solved all problems.

          1 Reply Last reply
          1

          1/4

          28 Jun 2018, 10:04

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved