How do you run code that uses PIO libraries on a Raspberry Pi?

I have the following platformio.ini file

platform = linux_arm
board = raspberrypi_3b
lib_deps = RadioHead

board = adafruit_feather_m0
framework = arduino
lib_deps = RadioHead

And the C++ program

#include <RHRealiableDatagram.h>

int main {


noting that RHReliableDatagram.h is in the RadioHead library. This code runs in the environment feather but not in the environment pi_3b. The error when running the code on pi_3b is that it could not find RHReliableDatagram.h even though I see the file under .pio/libdeps/pi_3b/RadioHead_ID124

Is there any reason why I cannot use libraries installed with PIO on the Raspberry Pi?

The library per its manifest only supports the Arduino and Energia (aka Arduino for MSP430) frameworks. The library dependency finder (LDF) may have excluded it because of it’s non-compatibility, since the Pi 3b only supports the Wiring framework (Raspberry Pi 3 Model B β€” PlatformIO latest documentation)

Have you previously successfully worked with the unmodified RadioHead library on the Raspbi?

1 Like

Not the RadioHead supplied by PIO

I have gotten the unmodified main RadioHead to work outside of PIO. I also have gotten it to work in PIO if I paste only the necessary files into the libs folder.

Great that it works now. It may have been that the library compatiblity check has prevented the library from working previously (wiring not in supported frameworks). There, Redirecting... may have helped if set to off. But I see you got it working anyways.