error in loading shared library in raspberry pi



  • i have cross compiled qt in raspberry pi and now i am trying to implement a shared library in it. i have created a shared library in qt in my laptop and deployed it to raspberry pi. then i created a widget application to call this library and see if it is working. when i tried to run this widget application in raspberry pi it is getting builded sucessfully. but when i tried to run it is showing error as "cannot load shared library"

    these are my .pro files of my library and application

    .pro of my library

    QT       += widgets
    
    QT       -= gui
    
    TARGET = libforpishared
    TEMPLATE = lib
    
    DEFINES += LIBFORPISHARED_LIBRARY
    
    SOURCES += libforpishared.cpp
    
    HEADERS += libforpishared.h\
            libforpishared_global.h
    
    INSTALLS        = target
    target.files    = libforpishared
    target.path     = /home/pi
    
    

    .pro of my application calling library

    QT       += core gui widgets
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = libtryforraspberrypi
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
    
    
    HEADERS  +=
    
    
    DEPENDPATH += /home/amruz/libforpishared
    INCLUDEPATH += /home/amruz/libforpishared
    LIBS += -L/home/amruz/build-libforpishared-Raspberry_Pi-Debug -llibforpishared
    
    INSTALLS        = target
    target.files    = libtryforraspberrypi
    target.path     = /home/pi
    

    i am not sure if i have given it correct also
    can anyone help me with this
    the library which i deployed is present in my raspberry pi /home/pi folder

    thanks in advance


  • Lifetime Qt Champion

    Hi,

    Where did you install that library on the Pi ?


Log in to reply
 

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