OneDrive\Arduino\libraries AND OneDrive\桌面\arduino-1.8.4\libraries

I have a program on the table can be used,But not on the laptop,Laptop's library are the same as the desk,but Out of service, Arduino shows

In file included from C:\Users\r5823\OneDrive\獢\RTC_Date_Time_on_LCD_Both_I2C\RTC_Date_Time_on_LCD_Both_I2C.ino:4:0:

C:\Users\r5823\OneDrive\文件\Arduino\libraries\DS1307RTC/DS1307RTC.h:19:22: error: 'tmElements_t' has not been declared

static bool read(tmElements_t &tm);

^

C:\Users\r5823\OneDrive\文件\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:23: error: 'tmElements_t' has not been declared

static bool write(tmElements_t &tm);

^

C:\Users\r5823\OneDrive\獢\RTC_Date_Time_on_LCD_Both_I2C\RTC_Date_Time_on_LCD_Both_I2C.ino: In function 'void loop()':

RTC_Date_Time_on_LCD_Both_I2C:38: error: 'tmElements_t' was not declared in this scope

RTC_Date_Time_on_LCD_Both_I2C:42: error: expected primary-expression before ')' token

RTC_Date_Time_on_LCD_Both_I2C:47: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:49: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:51: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:55: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:57: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:59: error: expected primary-expression before '.' token

RTC_Date_Time_on_LCD_Both_I2C:59: error: 'tmYearToCalendar' was not declared in this scope

"Wire.h"找到多個程式庫
已使用: C:\Users\r5823\OneDrive\桌面\arduino-1.8.4\hardware\arduino\avr\libraries\Wire
未使用: C:\Users\r5823\OneDrive\文件\Arduino\libraries\Wire
exit status 1
'tmElements_t' was not declared in this scope

Look in the installation and troubleshooting section if this is Windows10 with the latest updates applied. It's a known issue and some workarounds seem to be available.

The error indicates you're encountering the issue of time.h being included instead of Time.h.

Do this:

The reason you have to do that instead of installing via Library Manager is that there has not been a release since the TimeLib.h fix was made to the library (Use TimeLib.h · PaulStoffregen/DS1307RTC@160fa0d · GitHub).

If you get a file not found error about TimeLib.h then it means you also need to install the latest version of the Time library, which you can do via Library Manager.

pert,I used what you said,But still not,She shows

C:\Users\r5823\OneDrive\文件\Arduino\libraries\LiquidCrystal\I2CIO.cpp:35:26: fatal error: …/Wire/Wire.h: No such file or directory

#include <…/Wire/Wire.h>

^

compilation terminated.

"Wire.h"找到多個程式庫
已使用: C:\Users\r5823\OneDrive\桌面\arduino-1.8.4\hardware\arduino\avr\libraries\Wire
未使用: C:\Users\r5823\OneDrive\桌面\arduino-1.8.4\libraries\Wire
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。

I import the zip file from Arduino, which is stored in onedrive instead of arduino, so I have two libraries but importing zip from arduino goes directly to onedrive

That’s a completely different problem but it shows progress! To fix it do this:

  • Open C:\Users\r5823\OneDrive\文件\Arduino\libraries\LiquidCrystal\I2CIO.cpp in a text editor
  • Change line 35 from:
#include <../Wire/Wire.h>

to:

#include <Wire.h>
  • Save the file.

I changed it from cpp to #include <…/ Wire / Wire.h> to #include <Wire.h>, but he ran out of new problems and Arduino showed

In file included from C:\Users\r5823\OneDrive\獢\RTC_Date_Time_on_LCD_Both_I2C\RTC_Date_Time_on_LCD_Both_I2C.ino:4:0:

C:\Users\r5823\OneDrive\文件\Arduino\libraries\DS1307RTC/DS1307RTC.h:19:22: error: ‘tmElements_t’ has not been declared

static bool read(tmElements_t &tm);

^

C:\Users\r5823\OneDrive\文件\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:23: error: ‘tmElements_t’ has not been declared

static bool write(tmElements_t &tm);

^

C:\Users\r5823\OneDrive\獢\RTC_Date_Time_on_LCD_Both_I2C\RTC_Date_Time_on_LCD_Both_I2C.ino: In function ‘void loop()’:

RTC_Date_Time_on_LCD_Both_I2C:38: error: ‘tmElements_t’ was not declared in this scope

RTC_Date_Time_on_LCD_Both_I2C:42: error: expected primary-expression before ‘)’ token

RTC_Date_Time_on_LCD_Both_I2C:47: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:49: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:51: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:55: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:57: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:59: error: expected primary-expression before ‘.’ token

RTC_Date_Time_on_LCD_Both_I2C:59: error: ‘tmYearToCalendar’ was not declared in this scope

exit status 1
‘tmElements_t’ was not declared in this scope

I have to go to the website to download Time-2.5.0.zip and time_proto.zip two zip file and then import the zip file but still not successful

Did you do this:

pert:

r5823578:
I have to go to the website to download Time-2.5.0.zip and time_proto.zip two zip file and then import the zip file but still not successful

Don't worry about the Time library right now. If you don't have the right version installed you'll get a different error ("File not found: TimeLib.h") but you haven't gotten that error yet.

Hey, sir, can you give me your email or FB? I have a question asking you directly or making a friend with you

Thank you for your help I can use the laptop to do somethin