Qt creator cant find library! Please help.



  • I installed rtl-sdr libraries by:

    @git clone git://git.osmocom.org/rtl-sdr.git
    cd rtl-sdr
    autoreconf -i
    ./configure --enable-driver-detach
    make
    sudo make install
    sudo make install-udev-rules@

    Im using ubuntu(32 bit) on virtualbox.
    I am trying to add them to my Qt creator project but it CANT find the rtlsdr library!!
    The library is located in */usr/local/lib/librtlsdr.so and I have tried adding the following to my .pro file

    LIBS += -L/usr/local/lib -lrtlsdr
    INCLUDEPATH +=usr/local/lib

    Errors:
    @21:23:55: Running steps for project qt-test...

    21:23:55: Configuration unchanged, skipping qmake step.

    21:23:55: Starting: "/usr/bin/make"

    /home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link=/home/luis/qt-bbb/tslib/lib -Wl,-rpath,/opt/qt-arm/lib -o qt-test main.o mainwindow.o moc_mainwindow.o -L/home/luis/qt-bbb/tslib/lib -L/opt/qt-arm/lib -L/home/luis/qt-arm/rtl-sdr/build/src/ -lrtlsdr -lQtGui -L/opt/qt-arm/lib -L/home/luis/qt-bbb/tslib/lib -lQtNetwork -lQtCore -lpthread

    /home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /home/luis/qt-arm/rtl-sdr/build/src//librtlsdr.so when searching for -lrtlsdr

    /home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /home/luis/qt-arm/rtl-sdr/build/src//librtlsdr.a when searching for -lrtlsdr

    Makefile:105: recipe for target 'qt-test' failed

    /home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lrtlsdr

    collect2: error: ld returned 1 exit status

    make: *** [qt-test] Error 1

    21:23:55: The process "/usr/bin/make" exited with code 2.@

    Im using ubuntu 32bit and verified the libraries are 32 bit so i dont know why it cant find them or why its giving me "skipping incompatible" message. I also tried adding them by right clicking on the .pro->add library but still cant find them.



  • Welcome to DevNet

    You are building Qt project for linaro-arm. Have you built rtl-sdr for linaro-arm?
    Also you missed one slash in INCLUDEPATH assignment
    @
    LIBS += -L/usr/local/lib -lrtlsdr
    INCLUDEPATH +=usr/local/lib
    @



  • [quote author="andreyc" date="1418097464"]Welcome to DevNet

    You are building Qt project for linaro-arm. Have you built rtl-sdr for linaro-arm?
    Also you missed one slash in INCLUDEPATH assignment
    @
    LIBS += -L/usr/local/lib -lrtlsdr
    INCLUDEPATH +=usr/local/lib
    @[/quote]

    Ok I checked and the rtl-sdr and it was built for x86 and not arm...thanks for the hint! I already have an arm build of the rtl-sdr library on my beaglebone, can i transfer that file to the host or do i have to cross compile it?



  • Copy should be enough.
    I'm not familiar with arm builds but I think it should work.


Log in to reply
 

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