[SOLVED] error while loading shared libraries: cannot open shared object file: No such file or directory



  • I am using Qt5.5 . In my project i am using Qled as a custom widget. my project is working fine with Qled in windows and linux. I am using Qt Installer Framework for creating installer in linux . The final output from the Qt Installer Framework dos not run on double click when i run from the terminal i get error.

    error while loading shared libraries: libqledplugin.so: cannot open shared object file: No such file or directory
    

    So i found out that adding libqledplugin.so to the path /usr/local/lib works fine. I wanted to know is there other method to solve this error? Even if i place the .so file in the same folder as the output doesn't work . Should i add path to the .pro file? If so how to do it ?


  • Lifetime Qt Champion

    Hi,

    See this article about using path for that



  • @SGaist
    Thanks for the reply
    Your link helped me.
    I just added QMAKE_LFLAGS += -Wl,-rpath,"'$$ORIGIN'" to my .pro file and it takes .so file from the same directory


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.