Multiple Wire.h and out of memory

Hello,
I was trying to upload the new time set in the written Arduino nano code. The system pumps out this new error message. I tried to comment the //print suggested by some topics, it didn't work. Anybody know how to fix this?
Thank You!

"cc1plus.exe: out of memory allocating 4291434536 bytes

Multiple libraries were found for "Wire.h"
Used: C:\Program Files\Arduino\hardware\arduino\avr\libraries\Wire
Not used: C:\Program Files\Arduino\libraries\Wire
exit status 1
Error compiling for board Arduino Nano."

Try this:

  • File > New
  • Sketch > Verify/compile

Does the problem occur?

If not, this indicated the issue is somehow related to your sketch causing something in the compilation process to misbehave. There is a report here of something of that sort:

Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it’s ok to add it as an attachment.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you’re using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.

When your code requires a library that’s not included with the Arduino IDE please always post a link(using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger(Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

Please state which version of the Arduino IDE you’re using.

Hello Pert,
Thank you for your reply.
I did the file>new>sketch>verify. It worked out. But when I switched back to the written Arduino code, it still doesn't work.

I found out the script was running show something related to mac and realized I copied the libraries from my Mac to the windows computer. I delete the downloaded Mac libraries and redownloaded libraries in the windows computer. Everything worked out now.

Thank you for your help.