Important: Please read the Qt Code of Conduct -

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

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


  • Lifetime Qt Champion

    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 ?

  • Lifetime Qt Champion

    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:

  • @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) => (0x00007ffd2c569000) => /opt/ros/indigo/lib/ (0x00007f7890fef000) => /usr/lib/x86_64-linux-gnu/ (0x00007f7890799000) => /usr/lib/x86_64-linux-gnu/ (0x00007f789014c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788faa6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788f7a1000) => /lib/x86_64-linux-gnu/ (0x00007f788f58b000) => /lib/x86_64-linux-gnu/ (0x00007f788f1c6000) => /opt/ros/indigo/lib/ (0x00007f788ef9b000) => /opt/ros/indigo/lib/ (0x00007f788ed93000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788eb89000) => /opt/ros/indigo/lib/ (0x00007f788e983000) => /lib/x86_64-linux-gnu/ (0x00007f788e773000) => /lib/x86_64-linux-gnu/ (0x00007f788e555000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788e303000) => /lib/x86_64-linux-gnu/ (0x00007f788dffb000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788dcc6000) => /lib/x86_64-linux-gnu/ (0x00007f788d9bf000) => /lib/x86_64-linux-gnu/ (0x00007f788d799000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788d544000) => /lib/x86_64-linux-gnu/ (0x00007f788d32a000) => /usr/lib/nvidia-340/ (0x00007f788cfde000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788cbd7000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788c85d000) => /lib/x86_64-linux-gnu/ (0x00007f788c659000) => /lib/x86_64-linux-gnu/ (0x00007f788c451000)
    /lib64/ (0x0000561a07c2c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788c24c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788c043000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788be3a000) => /lib/x86_64-linux-gnu/ (0x00007f788bbfc000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788b9dd000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788b739000) => /usr/lib/x86_64-linux-gnu/ (0x00007f788b513000) => /usr/lib/nvidia-340/tls/ (0x00007f788b310000) => /usr/lib/nvidia-340/ (0x00007f78886fb000) => /usr/lib/x86_64-linux-gnu/ (0x00007f78884e9000) => /usr/lib/x86_64-linux-gnu/ (0x00007f7886c7c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f7886a77000) => /usr/lib/x86_64-linux-gnu/ (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 :)

  • Lifetime Qt Champion

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

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

  • Lifetime Qt Champion

    Can you share your code ?


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

  • Lifetime Qt Champion

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