Arduino project build error after import

Hello everyone,

I imported an Arduino project for Teensy into PlatformIO IDE and added used libraries. The files were copied to src subfolder of a new project.
Now I get strange errors when I try to build the project. Specifically, it consists of multiple .ino files, and the main one (with setup() and loop() functions in it) throws errors like error: 'File' does not name a type. But the line it refers to (number 29) doesn’t exist in that file which is only 26 lines long.
What’s happening and how can it be fixed?

Found the issue, the build process combines all .ino files into one big file, prepends it with #include <Arduino.h> and function prototypes, and then builds it.
Somehow I had to add #include <FS.h> to fix that specific error.
There were other build errors which I fixed by adding more includes, and then I hit the problem when one .ino file used the define from another .ino file, and that file was appended after the first one, so the compiler didn’t see the definition.
I’m not sure how it worked in Arduino IDE and it’s obvious that my project needs serious refactoring.

Never mind.