Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Qt BUG with executable generated, cannot doubleclick! (Ubuntu)

    Installation and Deployment
    deployment exe doubleclick ubuntu 14.04 qtcreator
    3
    9
    3874
    Loading More Posts
    • 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.
    • E
      Etienne123 last edited by

      Hi everyone, i'm having a real weird problem,
      I'm using QtCreator to develop on Ubuntu 14.04.

      Whenever I try to use a class from the rosbag library for instance, or more classic Qwt, i can launch my program within QtCreator (Compile & Run) and everything works fine. But whenever i try to launch the generated .exe by double-clicking it, NOTHING happens at all (the program doesn't launch and nothing appears in system monitor). I can launch it by prompt line too, but it won't work for me (i launch other bash commands with QProcess and it closes the app..), i really need to be able to launch the .exe by double clicking it. I must say i have no clue about what the problem could be (permissions i guess? or something like this..).

      I tried to give rights to the .exe file by doing a chmod -x on it, but when i double click it i get this error message : Invalid url: '/local/etienne/QtWorkspace/build-test-Desktop-Debug/test' given, exiting No ':' in the uri

      I hope someone will be able to help me, thanks in advance,

      Etienne

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Where are these two libraries located on your system ?

        What result do you get when calling ldd your_executable_name ?

        Where does that wrong url coming from ?

        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 Reply Quote 0
        • jsulm
          jsulm Lifetime Qt Champion last edited by

          There is no bug!
          You need to provide all needed libraries together with your application.
          In QtCreator it is working because it prepares the environment so that all libs are found.
          What you need to do is described here: http://doc.qt.io/qt-5/linux-deployment.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • E
            Etienne123 last edited by Etienne123

            @SGaist : thanks :) ,
            these libraries are located in /opt/ros/indigo/lib and /usr/local/qwt/lib
            i get this : (i don't use qwt in this project)
            linux-vdso.so.1 => (0x00007ffd2c569000)
            librosbag_storage.so => /opt/ros/indigo/lib/librosbag_storage.so (0x00007f7890fef000)
            libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f7890799000)
            libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f789014c000)
            libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f788faa6000)
            libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f788f7a1000)
            libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f788f58b000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f788f1c6000)
            librostime.so => /opt/ros/indigo/lib/librostime.so (0x00007f788ef9b000)
            libcpp_common.so => /opt/ros/indigo/lib/libcpp_common.so (0x00007f788ed93000)
            libconsole_bridge.so.0.2 => /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2 (0x00007f788eb89000)
            libroslz4.so => /opt/ros/indigo/lib/libroslz4.so (0x00007f788e983000)
            libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f788e773000)
            libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f788e555000)
            libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f788e303000)
            libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f788dffb000)
            libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f788dcc6000)
            libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f788d9bf000)
            libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f788d799000)
            libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f788d544000)
            libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f788d32a000)
            libGL.so.1 => /usr/lib/nvidia-340/libGL.so.1 (0x00007f788cfde000)
            libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007f788cbd7000)
            libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007f788c85d000)
            libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f788c659000)
            librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f788c451000)
            /lib64/ld-linux-x86-64.so.2 (0x0000561a07c2c000)
            libboost_system.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0 (0x00007f788c24c000)
            liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f788c043000)
            libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f788be3a000)
            libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f788bbfc000)
            libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f788b9dd000)
            libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f788b739000)
            libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f788b513000)
            libnvidia-tls.so.340.96 => /usr/lib/nvidia-340/tls/libnvidia-tls.so.340.96 (0x00007f788b310000)
            libnvidia-glcore.so.340.96 => /usr/lib/nvidia-340/libnvidia-glcore.so.340.96 (0x00007f78886fb000)
            libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f78884e9000)
            libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007f7886c7c000)
            libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7886a77000)
            libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7886871000)

            I don't where does this wrong URL come from, but i don't think it's the problem..

            @jsulm : Alright, i tried to make a .sh which sets the LD_LIBRARY_PATH to the correct value. But the thing is i must launch this .sh from my bash too, and my program gets stopped by other QProcesses that i launch with it .. I really need to be able to launch it with double click i think

            EDIT : OH, nvm! I'm a real newbie to Ubuntu, seems like you can run your .sh just by right-clicking and click "Run", it works fine now, thanks :)

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              What do you mean by it gets stopped by other QProcesses you launch with it ?

              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 Reply Quote 0
              • E
                Etienne123 last edited by

                If I launch my .exe in a command prompt, whenever a QProcess executes a bash command like "rosbag play name.bag", it will closes the .exe and executes the QProcess.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Can you share your code ?

                  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 Reply Quote 0
                  • E
                    Etienne123 last edited by

                    https://github.com/etienne1234/robotCode.git

                    There you go, but now my program is working by launching it with a .sh script as i said.

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      If I may, don't call the destructors like that. When you want to "destroy" a heap allocated object call delete on it.

                      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 Reply Quote 0
                      • First post
                        Last post