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. how to solve the error when the application is opened on another laptop

how to solve the error when the application is opened on another laptop

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 7 Posters 1.1k Views 4 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.
  • jsulmJ jsulm

    @Blackzero You're trying to run a debug build which requires debug versions of libraries it depends on (like the VCRUNTIME). You should deploy release builds of your app not debug. If you really want to deploy debug builds then also provide debug versions of these libraries.

    B Offline
    B Offline
    Blackzero
    wrote on last edited by Blackzero
    #3

    @jsulm So I have to build the release in qt creator and then redo the deploy with --release?

    Pl45m4P 1 Reply Last reply
    0
    • B Blackzero

      @jsulm So I have to build the release in qt creator and then redo the deploy with --release?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #4

      @Blackzero said in how to solve the error when the application is opened on another laptop:

      So I have to build the release in qt creator

      Yes.
      Debug build expects *_D or *d debug libraries and release the release libs (e.g. without debug symbols).


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #5

        Hi,

        One detail that comes from the top of my head, the debug version of the MSVC runtime are not redistributable.
        One alternative is to do a release with debug information build.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        B 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          One detail that comes from the top of my head, the debug version of the MSVC runtime are not redistributable.
          One alternative is to do a release with debug information build.

          B Offline
          B Offline
          Blackzero
          wrote on last edited by
          #6

          @SGaist What does that mean? How to do that?

          1 Reply Last reply
          0
          • MesrineM Offline
            MesrineM Offline
            Mesrine
            wrote on last edited by
            #7

            If you are using CMake adding
            include(InstallRequiredSystemLibraries)
            will install VCRuntime* dependencies in the install step.

            J.HilkJ B 2 Replies Last reply
            0
            • MesrineM Mesrine

              If you are using CMake adding
              include(InstallRequiredSystemLibraries)
              will install VCRuntime* dependencies in the install step.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #8

              @Mesrine seriously !? oO

              Maybe its time to switch to cmake after all


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              B 1 Reply Last reply
              0
              • MesrineM Mesrine

                If you are using CMake adding
                include(InstallRequiredSystemLibraries)
                will install VCRuntime* dependencies in the install step.

                B Offline
                B Offline
                Blackzero
                wrote on last edited by
                #9

                @Mesrine I use qmake, how is the code if in qmake

                1 Reply Last reply
                0
                • J.HilkJ J.Hilk

                  @Mesrine seriously !? oO

                  Maybe its time to switch to cmake after all

                  B Offline
                  B Offline
                  Blackzero
                  wrote on last edited by
                  #10

                  @J-Hilk
                  I have too much code that makes it impossible to move to cmake, is it possible to change qmake to cmake easily without having to redo the code

                  Christian EhrlicherC J.HilkJ 2 Replies Last reply
                  0
                  • B Blackzero

                    @J-Hilk
                    I have too much code that makes it impossible to move to cmake, is it possible to change qmake to cmake easily without having to redo the code

                    Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @Blackzero said in how to solve the error when the application is opened on another laptop:

                    without having to redo the code

                    You don't have to change code when you change the build system.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    1
                    • B Blackzero

                      @J-Hilk
                      I have too much code that makes it impossible to move to cmake, is it possible to change qmake to cmake easily without having to redo the code

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #12

                      @Blackzero the correct way to ship those particular dependencies that seem to be missing, is actually by having the user install those runtimes themselves:
                      https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

                      or by shipping the installer yourself (you're explicitly allowed to do that) and executing it during your app install process.


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      SGaistS 1 Reply Last reply
                      2
                      • J.HilkJ J.Hilk

                        @Blackzero the correct way to ship those particular dependencies that seem to be missing, is actually by having the user install those runtimes themselves:
                        https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

                        or by shipping the installer yourself (you're explicitly allowed to do that) and executing it during your app install process.

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        @J-Hilk except that the error message talks about the debug version of the runtime which is not redistributable. More information here.

                        @Blackzero if using qmake:

                        CONFIG += force_debug_info
                        

                        If using cmake:

                        CMAKE_BUILD_TYPE=RelWithDebInfo
                        

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1

                        • Login

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