Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Difference betwee debug and release builds
Qt 6.11 is out! See what's new in the release blog

Difference betwee debug and release builds

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qml
13 Posts 4 Posters 5.2k 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.
  • aha_1980A aha_1980

    @GrahamLa said in Difference betwee debug and release builds:

    However, in release mode I can run from within Qt Creator but not the command line.

    Because Creator sets up the PATHs so that all Qt libraries are found for running. If you want to run standalone, you need to deploy your program, e.g. for Windows: https://doc.qt.io/qt-5/windows-deployment.html

    G Offline
    G Offline
    GrahamLa
    wrote on last edited by
    #3

    @aha_1980
    Hi thanks
    I ran windeployqt for both release and debug versions.
    The debug version runs but not the release version
    Any Ideas?

    aha_1980A 1 Reply Last reply
    0
    • G GrahamLa

      @aha_1980
      Hi thanks
      I ran windeployqt for both release and debug versions.
      The debug version runs but not the release version
      Any Ideas?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #4

      @GrahamLa

      is there any error message shown?

      you can try to debug this with Dependency Walker, at least to some degree.

      [Edit: fixed typo, thanks @LeLev]

      Qt has to stay free or it will die.

      G 1 Reply Last reply
      2
      • aha_1980A aha_1980

        @GrahamLa

        is there any error message shown?

        you can try to debug this with Dependency Walker, at least to some degree.

        [Edit: fixed typo, thanks @LeLev]

        G Offline
        G Offline
        GrahamLa
        wrote on last edited by
        #5

        @aha_1980
        No output of any kind!
        Where do I go from here?

        ODБOïO aha_1980A 2 Replies Last reply
        0
        • G GrahamLa

          @aha_1980
          No output of any kind!
          Where do I go from here?

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by ODБOï
          #6

          hi @GrahamLa

          @aha_1980 said in Difference betwee debug and release builds:

          Dependency Walker

          [Edit: typo also]

          1 Reply Last reply
          1
          • G GrahamLa

            @aha_1980
            No output of any kind!
            Where do I go from here?

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #7

            @GrahamLa

            Use http://www.dependencywalker.com for debugging.

            Qt has to stay free or it will die.

            G 1 Reply Last reply
            2
            • aha_1980A aha_1980

              @GrahamLa

              Use http://www.dependencywalker.com for debugging.

              G Offline
              G Offline
              GrahamLa
              wrote on last edited by
              #8

              @aha_1980
              I have run dependency walker, but it shows no errors

              aha_1980A 1 Reply Last reply
              0
              • G GrahamLa

                @aha_1980
                I have run dependency walker, but it shows no errors

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @GrahamLa That usually means, all directly loaded DLLs are available.

                Still there can be some plugins missing, because they are loaded at runtime. Which Qt modules do you use in your program?

                Qt has to stay free or it will die.

                G 1 Reply Last reply
                0
                • aha_1980A aha_1980

                  @GrahamLa That usually means, all directly loaded DLLs are available.

                  Still there can be some plugins missing, because they are loaded at runtime. Which Qt modules do you use in your program?

                  G Offline
                  G Offline
                  GrahamLa
                  wrote on last edited by
                  #10

                  @aha_1980
                  My includes

                  #include <QGuiApplication>
                  #include <QQmlApplicationEngine>
                  #include <QQmlContext>
                  

                  My Qml imports

                  import QtQuick 2.9
                  import QtQuick.Controls 2.5
                  import QtQuick.Controls 1.4
                  

                  Its strange that debug works -cant see any differences between the deployment folders

                  aha_1980A 1 Reply Last reply
                  0
                  • G GrahamLa

                    @aha_1980
                    My includes

                    #include <QGuiApplication>
                    #include <QQmlApplicationEngine>
                    #include <QQmlContext>
                    

                    My Qml imports

                    import QtQuick 2.9
                    import QtQuick.Controls 2.5
                    import QtQuick.Controls 1.4
                    

                    Its strange that debug works -cant see any differences between the deployment folders

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @GrahamLa

                    Its strange that debug works

                    It probably finds the missing libs through PATH or an hardcoded path - not sure.

                    But as you use QML, have you told windeployqt about your QML files? How did you call it?

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    2
                    • G Offline
                      G Offline
                      GrahamLa
                      wrote on last edited by
                      #12

                      The problem seems to a misunderstanding on my part
                      I thought that the --qmldir argument to windeployqt was to point to my qml files, but pointing this at the qt installation qml files makes it work
                      Thanks everyone

                      J.HilkJ 1 Reply Last reply
                      0
                      • G GrahamLa

                        The problem seems to a misunderstanding on my part
                        I thought that the --qmldir argument to windeployqt was to point to my qml files, but pointing this at the qt installation qml files makes it work
                        Thanks everyone

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

                        @GrahamLa That's actually not a misunderstanding

                        the argument too --qmldir should be the path (absolute) to the folder, where your own qml files are located.

                        By pointing it to the qt installation it did copy all qml dependencies in your deployment folder and you're probably never going to use the majority of it.


                        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.

                        1 Reply Last reply
                        2

                        • Login

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