bimetek / QUSB

Qt wrapper classes for LibUSB 1.0
GNU Lesser General Public License v3.0
21 stars 16 forks source link

QUSB Error on startup #5

Open hanusek opened 9 years ago

hanusek commented 9 years ago

Hello. I opened project in QTCreator in Ubuntu and compiled it. Unfortunately, at the start of the application, the reports lack the library. I have files with libraries in the same directory. Uruchamianie /home/hans/build-qusb-Desktop_Qt_5_4_1_GCC_64bit-Release/bin/demo... /home/hans/build-qusb-Desktop_Qt_5_4_1_GCC_64bit-Release/bin/demo: error while loading shared libraries: libqusb.so.1: cannot open shared object file: No such file or directory /home/hans/build-qusb-Desktop_Qt_5_4_1_GCC_64bit-Release/bin/demo zakończone kodem 127

uranusjr commented 9 years ago

I’m not 100% sure, but it seems that the OS cannot find the shared library. On Linux you will need to either install the .so file (using make install), or configure the LD_LIBRARY_PATH environment variable (not that I recommend this, at least not on a permanent basis).

If all you want is to test the demo, you can configure the library as static instead. Add the following line to src.pro, below TEMPLATE = lib:

CONFIG += staticlib

And change the following line in demo.pro:

LIBS += -L../lib -lqusb

to

LIBS += -L../lib -lqusb -lusb-1.0

Delete everything inside lib, clean, and re-compile the project. The demo program should run now.