Unsolved error while loading shared libraries: libAbout.so.1: cannot open shared object file: No such file or directory
-
On a prog i try to use a shared lib that i created .
From QtCreator it works well , when i try from terminal i have this error msg :
error while loading shared libraries: libAbout.so.1: cannot open shared object file: No such file or directoryon .pro file i try with
unix:!macx: LIBS += -L$$PWD/../../lib/libqt/bin/ -lAboutINCLUDEPATH += $$PWD/../../lib/libqt/bin
INCLUDEPATH += $$PWD/../../lib/libqt/headers
DEPENDPATH += $$PWD/../../lib/libqt/binor
unix:!macx: LIBS += -L/home/user/path/lib/libqt/bin/ -lAbout
INCLUDEPATH += /home/user/path/lib/libqt/bin
INCLUDEPATH += /home/user/path/lib/libqt/headers
DEPENDPATH += /home/user/path/lib/libqt/binbut nothing change.
-
You need to set
LD_LIBRARY_PATH
to point to the folder where libAbout.so is present. Or put libAbout.so in standard library search paths (/usr/lib
and the like).Or compile with RPATH (see QMAKE_RPATH).
Or use deployment tool like linuxdeployqt.
Or compile your library statically.