I create dynamic library by means of Qt. I collect it, in the end I have 4 files:
3 links to the library.
- libfigure.so
- libfigure.so.1
- libfigure.so.1.0
And the library itself.
- libfigure.so.1.0.0
I create a new project and connect the library through the menu (Add Library - External ... - I select the library and header files). Here is the .pro file:
QT += core QT -= gui TARGET = libDemo CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp unix:!macx: LIBS += -L$$PWD/../build-figure-Desktop_Qt_Debug/ -lfigure INCLUDEPATH += $$PWD/../figure DEPENDPATH += $$PWD/../figure When you run the program from Qt Creator, everything works. But when running in the terminal:
./libDemo: error while loading loading shared libraries:
Where should I put the library so that the program runs from the terminal?