Plateformio vscode creates an esp32 project. Compilation cannot find dependent files such as ardunio. h, but the path and entity files in. json are both present

I can simply place the ardunio. h file in the include folder of the project file, but the dependencies will report errors one by one in the future

if someone can help me i will express heartfelt thanks;

I tried to copy the ardunio. h file from the library to the include folder under the project file. The issue with ‘not fin ardunio’ and ‘h’ no longer prompts, but instead prompts for missing related files

The ' symbols in the path may be killing it. Can you create a new user and test it in only ASCII paths as a test?

I have also considered the possibility of a problem with wu’gao’yang in the path, but I am not sure if I want to modify the user’s name due to some software adaptation issues

I would not try modification first, just adding a new Windows user account and switching to that for the test.

oky I’ll give it a try

Hello, I created a testing account and tested it without any issues. Is it because wu’gao’yang cannot recognize this path? Isn’t this Chinese language having such a big impact? At present, it seems that I can only modify the user’s name?

Okay so that test worked.

No you can actually chose to install PlatformIO and the projects in a path without the problematic characters as well. While C:\Users\<user>\.platformio is the default install path for the PIO core, you can modify it using the PLATFORMIO_CORE_DIR environment variable (source).

So I would recommend:

  1. Use your regular user account again.
  2. Close VSCode.
  3. Delete the C:\Users\<user>\.platformio folder completely
  4. Use Windows key → user environment variables → Add new user environment variable → name PLATFORMIO_CORE_DIR, value the new path where you want to have installed → OK
  5. Restart VSCode
  6. PlatformIO should reinstall itself in the new path.
  7. Remove the old project from the current workspace (right click in file explorer)
  8. Move the project also to a path without '
  9. Open it in VSCode again via File → Open Folder

See also docs

1 Like

Thank you very much. I have made the necessary changes/ Paltfomio location and environment variables are ready

1 Like