Results 1 to 4 of 4

Thread: Difference between running QT app with double click or from terminal

  1. #1
    Join Date
    Jul 2015
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question Difference between running QT app with double click or from terminal

    Hello all,
    I am facing a strange issue.
    I made an application in QT which works perfectly in both Release and Debug mode in QT IDE. Then I tried to run it with double-clicking on executable. Program starts but seem to fail to load some libraries needed to work as it should (Basler camera). It throws an error saying that it cant find any camera.

    The strange thing here is that when I tried to run the same executable from terminal (./appName) it worked without any issues. It seems to me that there is some env. variables problem, but I wonder why terminal and desktop uses different, if this is the case?

    I don't want the user to start my app from terminal but he should just click "on the icon".

    Did anyone have similar problems?

    Thank you for your answers

    My system is:
    nVidia Jetson
    Ubuntu 14.01 LTS
    QT creator 3.0.1
    QT 5.2.1
    gcc 4.7.3

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Difference between running QT app with double click or from terminal

    Sounds like a path issue.

    Have you tried starting from a terminal but not being inside the application's directory?
    I.e. having a working directory that is not incidentally the directory the application is in.

    Cheers,
    _

  3. #3
    Join Date
    Jul 2015
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Difference between running QT app with double click or from terminal

    Hi,
    sorry for the delay.
    I tried, yes, but the application does not start.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Difference between running QT app with double click or from terminal

    Quote Originally Posted by gtu View Post
    Hi,
    sorry for the delay.
    I tried, yes, but the application does not start.
    Excellent, then you've found the problem, i.e. the program only starting when the current working directory is the program directory.

    Cheers,
    _

Similar Threads

  1. Replies: 4
    Last Post: 11th January 2014, 04:06
  2. Replies: 2
    Last Post: 16th July 2012, 13:40
  3. Replies: 2
    Last Post: 28th November 2011, 16:12
  4. Replies: 2
    Last Post: 12th January 2009, 00:24
  5. Replies: 1
    Last Post: 17th May 2006, 01:23

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.