Important: Please read the Qt Code of Conduct -

How to use custom library?

  • I have create a lib in my project. When compile it, I got successful. But when I run it, I got a problem like that:

    @./testfancylineedit: error while loading shared libraries: cannot open shared object file: No such file or directory

    I don't know how to fix it. Please help me and give a tutorial about using custom library. Thank you all.

  • Lifetime Qt Champion


    Your library cannot be found by the loader. Since you're on linux you can update the LD_LIBRARY_PATH environment variable to point where that lib can be found.

    You can do that in the run settings from the project panel in QtCreator.

    Hope it helps

Log in to reply