FKW9 / esp-smartmeter-netznoe

Read Smartmeter Data and store to SD Card or publish to Graphite
MIT License
14 stars 4 forks source link

Identifier "strptime" is undefined #3

Closed Noschvie closed 2 years ago

Noschvie commented 2 years ago

What is missing to get "identifier "strptime" is undefined" solved ?

https://github.com/mitsubishievo99/esp-smartmeter-netznoe/blob/32dca8013baaa83d104a01f038344f367fa77a73/src/main.cpp#L140

FKW9 commented 2 years ago

Since you already compiled the code successfully (#2), i am assuming its an IDE/linting problem. strptime should be included with Arduino.h. You can try including or though

Noschvie commented 2 years ago

strptime() can be found in .platformio\packages\framework-arduinoespressif32\tools\sdk\include\newlib\time.h but this script isn't included.

Project can be compiled successfully, but it's strange... and the firmware crashed during boot.

FKW9 commented 2 years ago

The answer to the problem is found here. You can fix it by putting the following code after your includes. char *_EXFUN(strptime, (const char *__restrict, const char *__restrict, struct tm *__restrict)); This only works for ESP32!