.desktop file cannot find qwt library
Ubuntu 22.04
Qt 5.13.2
qwt-6.2.0
The desktop file:
Code:
[Desktop Entry]
Name=ADSR
Exec=/home/mja/eclipse/teensy_workspace/miller/gui/build-ADSR-Desktop_Qt_5_13_2_GCC_64bit-Release/ADSR
Icon=/home/mja/Desktop/Collection/icons/15 classy media player icons PNGs/128/back.png
Terminal=true
TerminalOptions=\s --noclose
Type=Application
MimeType=x-scheme-handler/eclipse+command;x-scheme-handler/eclipse+mpc;
When clicking this shortcut on the desktop, I get this error:
/home/mja/eclipse/teensy_workspace/miller/gui/build-ADSR-Desktop_Qt_5_13_2_GCC_64bit-Release/ADSR: error while loading shared libraries: libqwt.so.6.2: cannot open shared object file: No such file or directory
Running this file another way works fine : mja@mja:/usr/local/share/applications$ gtk-launch ADSR
and it works inside Qt-Creator.
This problem only occurs if qwt is included in the project
Help welcome!
Re: .desktop file cannot find qwt library
The environments for your desktop, terminal, and Qt Creator are probably different. In your desktop environment, the location of the qwt shared libraries is probably not included on the path that is searched when executables are loaded, while in a terminal or Qt Creator a different path is used which does contain the qwt .so location.
Re: .desktop file cannot find qwt library
Quote:
Originally Posted by
d_stranz
The environments for your desktop, terminal, and Qt Creator are probably different. In your desktop environment, the location of the qwt shared libraries is probably not included on the path that is searched when executables are loaded, while in a terminal or Qt Creator a different path is used which does contain the qwt .so location.
This entry in the .pro file cures the problem : QMAKE_RPATHDIR += /usr/local/qwt-6.2.0/lib/