'platformio.ini' erro

I’m a beginner.I am trying to compile an open source project.
My steps are as follows:

  1. Download the source file
    2.Use PlatformIO to open the project

but opening it with PlatformIO reports an error:
The project configuration process has encountered an error due to a problem with the ‘platformio.ini’ file. Please review the file and fix the issues.
I would appreciate any help I can get!

When you look at

the build_flags reference the [common] section’s build_flags setting, but there isn’t any [common] section defined in the file. Just delete line 22.

You are providing viable options, my problem is solved, thanks!

And just before the question comes up: These lines configure PlatformIO to upload via OTA and this specific IP address. However, when you don’t yet have the firmware flashed on your device, this of course doesn’t work. You can comment those lines by putting a ; in front of the line. Then it should be uploadable via the regular USB cable.

The project is ready to be compiled, but the compilation reports the following error:

C:/Users/cici/.platformio/packages/framework-arduinoespressif32/libraries/HTTPClient/src/HTTPClient.cpp: In member function 'void HTTPClient::setCookie(String, String)':
C:/Users/cici/.platformio/packages/framework-arduinoespressif32/libraries/HTTPClient/src/HTTPClient.cpp:1568:15: error: aggregate 'tm tm' has incomplete type and cannot be defined
     struct tm tm;
C:/Users/cici/.platformio/packages/framework-arduinoespressif32/libraries/HTTPClient/src/HTTPClient.cpp:1569:5: error: 'strptime' was not declared in this scope
     strptime(date.c_str(), HTTP_TIME_PATTERN, &tm);

It seems to be caused by missing header files, but I found the header file path in ‘c_cpp_properties.json’:

I don’t know what to do with it and I would be very grateful for your help!

Delete the file lib/Time/Time.h folder in the project. This “Time.h” file conflicts with the toolchain’s time.h standard-C file. After that, go into lib\Time\DateStrings.cpp and lib\Time\Time.cpp and change the previous Time.h to TimeLib.h.

If you don’t want to mess around in these files, I’ve also created a fork that fixes all these compilation problems.


Hi Maxgerhardt
Your work is fantastic, now that the code is ready to compile, your work will increase my confidence in using PlatfromIO!