-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while compiling with getTime() in GSM.cpp #120
Comments
im gettign the same error when i restart the ide if i have #include <TimeLib.h> inside the code. if i comment it out, recompile, uncomment it, and recompile again it will work. but i have to do this everytime i close the ide. and if i use any code that uses the timelib library i need to comment that out to so i get the first successful compile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get following error messages while compiling my project:
`Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino MKR GSM 1400"
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp: In member function 'long unsigned int GSM::getTime()':
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:339:13: error: aggregate 'GSM::getTime()::tm now' has incomplete type and cannot be defined
struct tm now;
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:341:7: error: 'strptime' was not declared in this scope
if (strptime(response.c_str(), "+CCLK: "%y/%m/%d,%H:%M:%S", &now) != NULL) {
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:341:7: note: suggested alternative: 'strxfrm'
if (strptime(response.c_str(), "+CCLK: "%y/%m/%d,%H:%M:%S", &now) != NULL) {
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:344:21: error: 'mktime' was not declared in this scope
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:344:21: note: suggested alternative: 'getTime'
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp: In member function 'long unsigned int GSM::getLocalTime()':
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:368:13: error: aggregate 'GSM::getLocalTime()::tm now' has incomplete type and cannot be defined
struct tm now;
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:370:7: error: 'strptime' was not declared in this scope
if (strptime(response.c_str(), "+CCLK: "%y/%m/%d,%H:%M:%S", &now) != NULL) {
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:370:7: note: suggested alternative: 'strxfrm'
if (strptime(response.c_str(), "+CCLK: "%y/%m/%d,%H:%M:%S", &now) != NULL) {
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:371:21: error: 'mktime' was not declared in this scope
D:\OneDrive\Arduino\libraries\MKRGSM\src\GSM.cpp:371:21: note: suggested alternative: 'getTime'
exit status 1`
The text was updated successfully, but these errors were encountered: