Seeed-Solution / SenseCAP_Indicator_ESP32

SenseCAP Indicator SDK.
https://wiki.seeedstudio.com/SenseCAP_Indicator_How_To_Flash_The_Default_Firmware/#ESP-IDF
Apache License 2.0
36 stars 26 forks source link

Compile error: unknown type name 'time_t' #34

Closed fabianmuehlberger closed 7 months ago

fabianmuehlberger commented 10 months ago

During compile of the /examples/indicator_basis, the following errors occurred:

n file included from /home/fabian/Desktop/indicator/SenseCAP_Indicator_ESP32/examples/indicator_basis/main/view/indicator_view.h:4,
                 from /home/fabian/Desktop/indicator/SenseCAP_Indicator_ESP32/examples/indicator_basis/main/main.c:10:
/home/fabian/Desktop/indicator/SenseCAP_Indicator_ESP32/examples/indicator_basis/main/view_data.h:68:5: error: unknown type name 'time_t'
   68 |     time_t  time;       // use when auto_update is true
      |     ^~~~~~
/home/fabian/Desktop/indicator/SenseCAP_Indicator_ESP32/examples/indicator_basis/main/view_data.h:80:5: error: unknown type name 'time_t'
   80 |     time_t  timestamp;
      |     ^~~~~~
/home/fabian/Desktop/indicator/SenseCAP_Indicator_ESP32/examples/indicator_basis/main/view_data.h:88:5: error: unknown type name 'time_t'
   88 |     time_t  timestamp;
      |     ^~~~~~

This can be resolved by including in the view_data.h directly.

I have not checked if the time.h is already included within an earlier include, I have checked this problem by getting the newest esp IDF (ESP-IDF v5.1.2-dirty), on an updated Linux machine.

Love4yzp commented 10 months ago

Thanks for your issue picked up. I'll figure it out later.

gitbjo commented 8 months ago

I have the same issue with ESP-IDF v5.1.2 Release. @fabianmuehlberger - thanks for the suggested change :-)

gidim commented 7 months ago

Same issue

Love4yzp commented 7 months ago

42 Done