Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess unexpectedly finished
Qt 6.12 LTS is out! See what's new in the release blog

QProcess unexpectedly finished

Scheduled Pinned Locked Moved Solved General and Desktop
30 Posts 4 Posters 20.8k Views 2 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.
  • K krist

    @J-Hilk
    hello

    yapps it's runnable
    the step i use is

    $cd Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/
    enter
    $./analogclock
    
    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #21

    @krist
    Then you need to use something in your code which is actually the same as that, not what your screen shot has which is simply not the same!
    Hint: /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock.
    Which you seem to have had at one point, and then changed to something wrong.

    1 Reply Last reply
    1
    • K Offline
      K Offline
      krist
      wrote on last edited by
      #22

      yeah i have tried that and error is come up
      here is the error

      /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock)
      
      sierdzioS JonBJ 2 Replies Last reply
      0
      • K krist

        yeah i have tried that and error is come up
        here is the error

        /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock)
        
        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #23

        @krist said in QProcess unexpectedly finished:

        yeah i have tried that and error is come up
        here is the error

        /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock)
        

        That's where LD_LIBRARY_PATH comes in ;-) You can set it with https://doc.qt.io/qt-5/qprocess.html#setProcessEnvironment

        (Z(:^

        K 1 Reply Last reply
        4
        • K krist

          yeah i have tried that and error is come up
          here is the error

          /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock)
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #24

          @krist
          OK, let's start from there! That path is correct, so let's not change off that!

          Now you have some issue of not finding the correct Qt version.

          Are you Linux? Did you build your own Qt, or did you accept the one supplied with the distro? Have you installed more than one version of Qt at some point?

          Ah, I see @sierdzio is pointing you at what you can look at.... I will leave you in his capable hands :)

          1 Reply Last reply
          2
          • sierdzioS sierdzio

            @krist said in QProcess unexpectedly finished:

            yeah i have tried that and error is come up
            here is the error

            /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/krist/Qt5.13.2/Examples/Qt-5.13.2/gui/build-analogclock-Desktop_Qt_5_13_2_GCC_64bit-Debug/analogclock)
            

            That's where LD_LIBRARY_PATH comes in ;-) You can set it with https://doc.qt.io/qt-5/qprocess.html#setProcessEnvironment

            K Offline
            K Offline
            krist
            wrote on last edited by
            #25

            @sierdzio
            ok
            so right now the problem lies on my install qt right?
            where should i source that environment?
            is it to my workable analogclock?

            env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable
            

            @JonB
            yeah i'm using linux and have 2 qt (one with ros plugin and the others only for qt)
            tahnk you so much for your help!!!

            sierdzioS 1 Reply Last reply
            0
            • K krist

              @sierdzio
              ok
              so right now the problem lies on my install qt right?
              where should i source that environment?
              is it to my workable analogclock?

              env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable
              

              @JonB
              yeah i'm using linux and have 2 qt (one with ros plugin and the others only for qt)
              tahnk you so much for your help!!!

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #26

              @krist said in QProcess unexpectedly finished:

              @sierdzio
              ok
              so right now the problem lies on my install qt right?

              No. You simply have compiled AnalogClock using Qt incompatible with the one installed in the system. It's not an error, it's not a problem. Its actually quite common thing. Try double-cliking on your analogclock binary file - it will probably fail to run, too.

              The proper way to solve it is to deploy AnalogClock so that it runs on your system without any changes to paths.

              where should i source that environment?
              is it to my workable analogclock?

              env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable
              

              You need to add LD_LIBRARY_PATH and point it to your Qt 5.13.2 installation directory - where libraries are located. So something like:

              env.insert("LD_LIBRARY_PATH", "/home/krist/qt/Qt5.13.2/gcc_64/lib/");
              

              That needs to be fed to your QProcess so that the system can find proper Qt libraries when running Analog Clock example.

              The reason why it runs from Qt Creator is that Qt Creator sets LD_LIBRARY_PATH automatically.

              (Z(:^

              K 1 Reply Last reply
              4
              • sierdzioS sierdzio

                @krist said in QProcess unexpectedly finished:

                @sierdzio
                ok
                so right now the problem lies on my install qt right?

                No. You simply have compiled AnalogClock using Qt incompatible with the one installed in the system. It's not an error, it's not a problem. Its actually quite common thing. Try double-cliking on your analogclock binary file - it will probably fail to run, too.

                The proper way to solve it is to deploy AnalogClock so that it runs on your system without any changes to paths.

                where should i source that environment?
                is it to my workable analogclock?

                env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable
                

                You need to add LD_LIBRARY_PATH and point it to your Qt 5.13.2 installation directory - where libraries are located. So something like:

                env.insert("LD_LIBRARY_PATH", "/home/krist/qt/Qt5.13.2/gcc_64/lib/");
                

                That needs to be fed to your QProcess so that the system can find proper Qt libraries when running Analog Clock example.

                The reason why it runs from Qt Creator is that Qt Creator sets LD_LIBRARY_PATH automatically.

                K Offline
                K Offline
                krist
                wrote on last edited by
                #27

                @sierdzio
                wow
                thank you very much
                I succed doing that

                thank you for your hospitality and patience toward me
                sory i'm so late to noticed it

                JonBJ 1 Reply Last reply
                1
                • sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #28

                  No worries, happy coding :-)

                  (Z(:^

                  1 Reply Last reply
                  1
                  • K krist

                    @sierdzio
                    wow
                    thank you very much
                    I succed doing that

                    thank you for your hospitality and patience toward me
                    sory i'm so late to noticed it

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

                    @krist
                    Hi there. I just wanted to say: if I was too harsh on you here and your other posting which I see you have now deleted, I would not want you to be put off asking questions in this forum! You are entitled to ask whatever you like, this is a friendly & helpful forum. I am just grumpy :)

                    So don't be put off by me. Just please put some attention to detail in your work. When coding, you have to get every character correct, it's no use seeing something to try and then not copying the correct stuff and changing it to something else. That's all.

                    So no intention to upset you, best of luck. :)

                    K 1 Reply Last reply
                    4
                    • JonBJ JonB

                      @krist
                      Hi there. I just wanted to say: if I was too harsh on you here and your other posting which I see you have now deleted, I would not want you to be put off asking questions in this forum! You are entitled to ask whatever you like, this is a friendly & helpful forum. I am just grumpy :)

                      So don't be put off by me. Just please put some attention to detail in your work. When coding, you have to get every character correct, it's no use seeing something to try and then not copying the correct stuff and changing it to something else. That's all.

                      So no intention to upset you, best of luck. :)

                      K Offline
                      K Offline
                      krist
                      wrote on last edited by
                      #30

                      @JonB
                      hi JonB
                      thank you very much for your effort to help me

                      afterall, it is my fault not pay attention enough because my dozen trials failed .
                      I will make sure next time to put the correct stuff for the question.

                      thank you for your clarification
                      glad to hear that

                      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
                      • Unsolved