<avr/pgmspace.h> no such file or directory running particle could on Raspberry pi3

Hi, i’m trying to flash an arduino program to my raspberry pi3 through Particle cloud ide. The cloud has my pi device recognized. But when i tried to flash the program to the pi. I got an error saying: “Print.h” no such file or directory. So i googled to copy the Print.h and Print.cpp source files. Then it gives me another warning about “WString.h” file can’t be found. So copied the “WString.h” and “WString.cpp” files from online source. After that, it gives me error saying “avr/pgmspace.h” no such file or directory. I can’t find the source files online anywhere for “avr/pgmspace.h”. Now i’m stuck here. Can anyone tell me a solution to this library thing. I feel like even if i figured out the “avr/pgmspace.h”, it would give me other errors about library not found. This program is written for Arduino development board, and runs with no error including those libraries.Now I need to run it on my raspberry pi for my project. Seems like the pi3 doesn’t have these libraries like arduino. Can anyone tell me how to solve this problem. Thank you so much.

That’s most likely also the issue. Often there are hardware specific instructions in certain libraries. The fact that you need the AVR library shows this is one of those, since that’s rather arduino specific. So some ‘porting’ of the code might be required. If you can show us the complete code, we might be able to advise.

my guess is your message is noting it can not find file pgmspace.h that resided in a directory named avr. one thing i learned 40 years ago is go through scripts you “borrow” and make sure each line makes sense for your particular application.

I finally found a solution to this problem by adding a line " #include “application.h” to replace "#include “Print.h” which does the same thing and doesn’t require the line “#include “avr/pgmspace.h”” library anymore.
Thank you for the prompt reply though!