Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1

    PiCore Player : installing Shared libraries

    Hello guys,

    I am an IT guy, but on crosoft world.. even if I studied unix in school.. that was a long time ago.. be gentle with me
    I have created an application in CPP that uses GPIO, the aim, is to turn on/off an HI-Fi triggered by the GPIO on the piCorePlayer.
    My application worked fine on a Rasbian OS 32 bit using libWiring shared library.
    On the first step, when i ran the application for the first time on the piCorePlayer.. the shell told me that it was not found.. I realise that my compilation was 32bits, and the piCoreplayer was 64.. I thought that 32bit application can be run on 64bit OS.. but I reinstall the piCoreplayer in 32bit.. and I had the next error : cannot find the share library libWiring.so

    I have copied it into the application directory => library still not found
    I have tried to copy it into /usr/local/lib => access denied
    I have tried to install the package from repository = > dpkg not found
    I have tried to compile staticaly the lib, but i don't have the .o of the lib, only .so

    what can i do ?

    I am sure i will need you for the next blocking steps

    thx for your help

    yves

  2. #2
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    wiring pi is a depreciated library, it won't work properly on a pi4, so we don't offer that package.

    pCP is a different kind of OS that you are used to. It is bare bones. You might want to read a little bit on how piCore/TinyCore works. http://tinycorelinux.net/faq.html

  3. #3
    Quote Originally Posted by paul- View Post
    wiring pi is a depreciated library, it won't work properly on a pi4, so we don't offer that package.

    pCP is a different kind of OS that you are used to. It is bare bones. You might want to read a little bit on how piCore/TinyCore works. http://tinycorelinux.net/faq.html
    thank you paul for your quick reply, i am'going to have a closer look to this faq.. but in the meantime, why can't i copy the shared library to /usr/local/bin ? Wouldn't be the easiest to resolve my issue ?

  4. #4
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    You can, it just won't survive a reboot unless you backup the file too.
    Last edited by paul-; 2021-11-11 at 13:26.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #5
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,379
    hi ygi,

    You really need to understand tinycore/picore *before* you do any development. Its not like other Linux distributions.

    My changes disappeared

    regards
    Greg

  6. #6
    Quote Originally Posted by paul- View Post
    wiring pi is a depreciated library, it won't work properly on a pi4, so we don't offer that package.
    Hi Paul.. I had the opportunity to make it run but bay a wrong way... I have added /lib into the backup, downloaded on my Win in order to add the libwiring.so to the library, and uploaded back to the SD.
    but I would prefer to do it in a proper manner... you suggest not to use libwiring to control GPIO for CPP project. I don't find the good way to do it...
    could you give me the name of library i can add in the link ? or is there a system lib installed on piCore that i could use ?

    best regards

    yves

  7. #7
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    It depends on what you are trying to do. There are very simple implementations to full libraries. If you need precision timing for encoders or other clock driven uses, use pigpio. There is an extension in our repo. For simple implantations, look at how we do it in squeezelite.

    https://github.com/ralph-irving/sque...minimal_gpio.c
    Last edited by paul-; 2021-11-24 at 19:19.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •