Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deployment with MSVC2015 compiler
Forum Updated to NodeBB v4.3 + New Features

Deployment with MSVC2015 compiler

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
9 Posts 2 Posters 2.7k Views
  • 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.
  • A Offline
    A Offline
    alecs26
    wrote on last edited by
    #1

    Hello,

    I have already successfully deploy Qt applications with MinGW on Windows XP,7,8,10. However, for a particular application I need to use the MSVC2015 compiler (I use Qt 5.9.2 on Win8).

    I build the application with Qt and directly use the .exe it generates. I included all the Qt dependencies. However, when I run my program on a Win7 machine, there are some dll missings (msvcp140.dll, concrt140.dll, vcruntime140.dll). These are all dll my Win8 machine has in C:\SysWOW64. When I run ProcessExplorer on my Win8 machine to see the dll dependencies, there are many dll in SysWOW64.

    What I did is that I copied the 3 missing dll from my Win8 machine from C:\SysWOW64 to the .exe folder. It works.

    However, I am not sure it's a good way of doing it...Also, I am afraid that another computer would need more dlls or something from C:\SysWOW64.

    Thank you very much,

    Alex

    JonBJ 1 Reply Last reply
    0
    • A alecs26

      Hello,

      I have already successfully deploy Qt applications with MinGW on Windows XP,7,8,10. However, for a particular application I need to use the MSVC2015 compiler (I use Qt 5.9.2 on Win8).

      I build the application with Qt and directly use the .exe it generates. I included all the Qt dependencies. However, when I run my program on a Win7 machine, there are some dll missings (msvcp140.dll, concrt140.dll, vcruntime140.dll). These are all dll my Win8 machine has in C:\SysWOW64. When I run ProcessExplorer on my Win8 machine to see the dll dependencies, there are many dll in SysWOW64.

      What I did is that I copied the 3 missing dll from my Win8 machine from C:\SysWOW64 to the .exe folder. It works.

      However, I am not sure it's a good way of doing it...Also, I am afraid that another computer would need more dlls or something from C:\SysWOW64.

      Thank you very much,

      Alex

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @alecs26 said in Deployment with MSVC2015 compiler:
      BTW, you keep saying C:\SysWOW64, you sure you don't mean C:\WINDOWS\SysWOW64 ?

      Do you mean: the file exists on the Win8 machine where you installed MSVC2015 compiler to do your work, but not on a Win7 machine where you did not install compiler?

      And also btw, are you indeed compiling for 32-bit (rather than 64-bit)? What 32-/64-bit-ness are the Win8 & Win7 machines?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alecs26
        wrote on last edited by
        #3

        @JNBarchan Good questions, sorry I didn't directly mentioned them

        • Yes, I meant C:\Windows\SysWOW64
        • I exactly mean "the file exists on the Win8 machine where you installed MSVC2015 compiler to do your work, but not on a Win7 machine where you did not install compiler?"
        • Yes, I am compiling a 32 bit application. It must be a 32 bit app. My Win8 is 64 bit, my Win7 is 32 bit
        JonBJ 1 Reply Last reply
        0
        • A alecs26

          @JNBarchan Good questions, sorry I didn't directly mentioned them

          • Yes, I meant C:\Windows\SysWOW64
          • I exactly mean "the file exists on the Win8 machine where you installed MSVC2015 compiler to do your work, but not on a Win7 machine where you did not install compiler?"
          • Yes, I am compiling a 32 bit application. It must be a 32 bit app. My Win8 is 64 bit, my Win7 is 32 bit
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @alecs26
          OK, so although I know nothing about how " I included all the Qt dependencies" works, I can tell you those files are the MSVC2015 C runtime libraries. They are needed on any target machine.

          On your Win8 machine you have them because you installed the compiler, and they would have come with it. On another machine they may well not be there. You have to ensure they are distributed and installed with your app, because it needs them.

          I don't know how you "deploy" Qt apps, whether it's supposed to bundle these with some "installer", when it comes from MSVC. But that's what those files are.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alecs26
            wrote on last edited by
            #5

            Perfect, thank you.
            For the Qt Dependencies, I used windeployqt to get all Qt dlls and necessary files.

            I just wanted to be sure there was no other files I would need to distribute and if the way I did it for the 3 dlls (*140.dll) was ok (simply copying from C:\Windows\SysWOW64).

            Thanks,

            Alex

            JonBJ 1 Reply Last reply
            0
            • A alecs26

              Perfect, thank you.
              For the Qt Dependencies, I used windeployqt to get all Qt dlls and necessary files.

              I just wanted to be sure there was no other files I would need to distribute and if the way I did it for the 3 dlls (*140.dll) was ok (simply copying from C:\Windows\SysWOW64).

              Thanks,

              Alex

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @alecs26
              I would have expected your "windeployqt" to get it right, but I don't know. If it's supposed to include all runtime files. But remember these are specific to MSVC, not MinGW, so I don';t know how it knows that

              You should not have to copy these over yourself. Indeed you must be careful, because your versions could be older than versions on some machines. So you do need a "proper" solution to this. maybe someone else will answer....

              If you only want it for yourself, and don't get a better solution, at least Google for "install MSVC 2015 runtime distributables", there will be a download to do it properly, don't just copy the files across yourself

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alecs26
                wrote on last edited by
                #7

                Thank you,

                I think windeployqt only manage Qt dll and files. It did not copy neither dll for opencv or other libraries I use. My solution should work on any computer so I would appreciate to know the "good" way to do it without my users being in the obligation to install MSVC distributables.

                JonBJ 1 Reply Last reply
                0
                • A alecs26

                  Thank you,

                  I think windeployqt only manage Qt dll and files. It did not copy neither dll for opencv or other libraries I use. My solution should work on any computer so I would appreciate to know the "good" way to do it without my users being in the obligation to install MSVC distributables.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by JonB
                  #8

                  @alecs26 said in Deployment with MSVC2015 compiler:

                  install MSVC distributables

                  OK, look at http://doc.qt.io/qt-5/windows-deployment.html, you'll see it's talking about at least some of your files there:

                  In addition, the archive must contain the following compiler specific libraries depending on your version of Visual Studio:
                  VC++ 12.0 (2013) VC++ 14.0 (2015)
                  The C run-time msvcr120.dll vccorlib140.dll, vcruntime140.dll
                  The C++ run-time

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    alecs26
                    wrote on last edited by
                    #9

                    @JNBarchan oh thanks, I read this page but I didn't see that, thanks !
                    So I guess it's OK if I just copy them from my C:\Windows\SysWOW64 folder...

                    1 Reply Last reply
                    0

                    • Login

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