PDA

View Full Version : Difference between running QT app with double click or from terminal



gtu
17th July 2015, 08:20
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

anda_skoa
17th July 2015, 10:20
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,
_

gtu
28th July 2015, 08:31
Hi,
sorry for the delay.
I tried, yes, but the application does not start.

anda_skoa
28th July 2015, 09:05
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,
_