How are Arduino .ino and libraries, e.g..h, converted to run in PlatfromIO?

How are Arduino .ino and libraries, e.g. Wire.h, converted to run in PlatfromIO?
I am totally lost, and in need of help! Spent hours on this and can’t seem to figure it out.

Libraries need not be converted as PlatformIO copes very well with the Arduino source files and directory structure.

However, if the libraries are written using the Arduino Language (pinMode, digitalWrite etc) then those libraries are only usable with an Arduino framework. If they are written in plain C++ then they are usable in the Arduino framework or in AVR native mode.

Header files don’t need converting. They just describe what the library contains.

Is this what you wanted to know?

Cheers,
Norm.

Hi Norm,

Thanks for your clear explanation and prompt reply.
I have taken a look a look at the Arduino library (Adafruit_MPR121.cpp) it appears to me to be written in C++. As it clearly says it is, .cpp .

However, when I open my Arduino project with PIO Home I receive the following list of errors.
I would greatly appreciate it if you will explain to me what I am doing incorrectly.

I no doubt will have further questions if you don’t mind, and greatly appreciate your help.

Cheers, Bob

All those squiggles are coming from so called “intellisense”. It has no idea where to find the headers etc, so throws up squiggles. If you attempt a build that usually solves the problem because the locations of the files become known.

Intellisense is part of the C++ extension provided by Microsoft, which is used by PlatformIO, but is not part of it.

One of the statusbar buttons will rebuild the intellisense index if necessary – hover over the icons for a hint, but a build usually suffices. (Sorry about the vagueness there, I’m not near a computer!)

Intellisense “errors” can normally be ignored if you haven’t done a build yet, or have added a new header file etc.

No worries. You’ll find us to be a helpful bunch.