Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. error in loading shared library in raspberry pi
Qt 6.11 is out! See what's new in the release blog

error in loading shared library in raspberry pi

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 636 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amruz
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Where did you install that library on the Pi ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved