Closed ianburton20 closed 2 months ago
Hmmm, I just compiled it myself and it works fine.
Did you copy the code exactly?
If yes, I'm guessing your issue is associated with a time library someplace on your system.
I did a quick google and found a variety of people having the same problem with other projects. Here are two examples: https://community.platformio.org/t/issue-with-struct-tm/19017/4 https://community.platformio.org/t/aggregate-tm-timeinfo-has-incomplete-type-and-cannot-be-defined/13715
Also, it if helps, the ESPTime.h library I am using is this one: https://github.com/fbiego/ESP32Time Originally, when I compiled my code I was using version 2.0.0 and it compiled fine. Following your post I upgraded it to version 2.0.4 (the current version) and it also compiled fine. Are you perhaps using an older library?
Rob – Thanks. You have given me something definite to follow up. I’ll let you know how I get on. Thanks again – Ian
From: Rob Latour @.> Sent: 23 January 2024 13:54 To: roblatour/ESP32TimeServer @.> Cc: ianburton20 @.>; Author @.> Subject: Re: [roblatour/ESP32TimeServer] Compile Errors (Issue #4)
Hmmm, I just compiled it myself and it works fine.
Did you copy the code exactly?
If yes, I'm guessing your issue is associated with a time library someplace on your system.
I did a quick google and found a variety of people having the same problem with other projects. Here are two examples: https://community.platformio.org/t/issue-with-struct-tm/19017/4 https://community.platformio.org/t/aggregate-tm-timeinfo-has-incomplete-type-and-cannot-be-defined/13715
Also, it if helps, the ESPTime.h library I am using is this one: https://github.com/fbiego/ESP32Time Originally, when I compiled my code I was using version 2.0.0 and it compiled fine. Following your post I upgraded it to version 2.0.4 (the current version) and it also compiled fine. Are you perhaps using an older library?
— Reply to this email directly, view it on GitHub https://github.com/roblatour/ESP32TimeServer/issues/4#issuecomment-1906108590 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUL7AWM2YZRUYKV6B27ORDYP66JFAVCNFSM6AAAAABCG7OMD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGEYDQNJZGA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AIUL7AX62WWKJQKC6HET63LYP66JFA5CNFSM6AAAAABCG7OMD2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTRTTUK4.gif Message ID: @. @.> >
Rob
I’m OK with ESP32Time.h – using v2.0.4
But – I’m back into…
void setDateAndTimeFromGPS(void *parameter)
and that structure
struct tm wt;
error: aggregate 'tm wt' has incomplete type and cannot be defined
also….
I can’t find where mktime is declared in….
candidateDateAndTime = mktime(&wt) + 1; // not sure why the + 1 but it is
What version of https://github.com/khoih-prog/Timezone_Generic
Are you using?
You #include
Thanks again.
Ian
From: Rob Latour @.> Sent: 23 January 2024 13:54 To: roblatour/ESP32TimeServer @.> Cc: ianburton20 @.>; Author @.> Subject: Re: [roblatour/ESP32TimeServer] Compile Errors (Issue #4)
Hmmm, I just compiled it myself and it works fine.
Did you copy the code exactly?
If yes, I'm guessing your issue is associated with a time library someplace on your system.
I did a quick google and found a variety of people having the same problem with other projects. Here are two examples: https://community.platformio.org/t/issue-with-struct-tm/19017/4 https://community.platformio.org/t/aggregate-tm-timeinfo-has-incomplete-type-and-cannot-be-defined/13715
Also, it if helps, the ESPTime.h library I am using is this one: https://github.com/fbiego/ESP32Time Originally, when I compiled my code I was using version 2.0.0 and it compiled fine. Following your post I upgraded it to version 2.0.4 (the current version) and it also compiled fine. Are you perhaps using an older library?
— Reply to this email directly, view it on GitHub https://github.com/roblatour/ESP32TimeServer/issues/4#issuecomment-1906108590 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUL7AWM2YZRUYKV6B27ORDYP66JFAVCNFSM6AAAAABCG7OMD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGEYDQNJZGA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AIUL7AX62WWKJQKC6HET63LYP66JFA5CNFSM6AAAAABCG7OMD2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTRTTUK4.gif Message ID: @. @.> >
I just checked my libraries, it looks as if I'm now using https://github.com/JChristensen/Timezone (version 1.24) for Timezone.h
Not sure when I switched to it, or why, but it seems to work with this project too.
If this works for you please let me know and I'll update the source on Github
closed due to lack of feedback (no activity in over six months)
Rob - thanks for this project. I get a couple of compile errors - any suggestions where I'm going wrong? Thanks
ESP32TimeServer_Test1.ino: In function 'void setDateAndTimeFromGPS(void*)': ESP32TimeServer_Test1:355:19: error: aggregate 'tm wt' has incomplete type and cannot be defined struct tm wt; ^~ (up arrow points to wt) ESP32TimeServer_Test1:369:34: error: 'mktime' was not declared in this scope candidateDateAndTime = mktime(&wt) + 1; // not sure why the + 1 but it is ^~~~~ (up arrow points to mktime)