Please be aware of all shipping deadlines before placing your order - we cannot guarantee orders will arrive before Christmas!

Error messages when compiling the code for RTC
Moderators: adafruit_support_bill, adafruit

Error messages when compiling the code for RTC

by bistnasr on Fri Mar 08, 2013 11:23 am

Dear Sir/Madame:
I am interested in buying the Real Time Clock PCB from your site, however, I want to confirm that the code is compiling. I downloaded the Arduino software and when I compiled the code provided in your tutorial I got the following error messages. Can you please help me to fix the problem?

C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:22: undefined reference to `RTC_DS1307::now()'
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:38: undefined reference to `DateTime::unixtime() const'
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:40: undefined reference to `DateTime::unixtime() const'
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:44: undefined reference to `DateTime::unixtime() const'
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:44: undefined reference to `DateTime::DateTime(unsigned long)'
sketch_mar08a.cpp.o: In function `setup':
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:11: undefined reference to `RTC_DS1307::begin()'
C:\Documents and Settings\Nasr\My Documents\Downloads\arduino-1.0.3-windows\arduino-1.0.3/sketch_mar08a.ino:13: undefined reference to `RTC_DS1307::isrunning()'


I will wait for your advice and thanks for your help.
Nasr
P. Eng.
bistnasr
 
Posts: 2
Joined: Thu Mar 07, 2013 3:30 pm

Re: Error messages when compiling the code for RTC

by adafruit_support_rick on Fri Mar 08, 2013 5:00 pm

Looks like you didn't download and install the RTC library.
If you did download the library, then it is not installed correctly. See our Libraries Tutorial for detailed instructions!
Last edited by adafruit_support_rick on Fri Mar 08, 2013 5:01 pm, edited 1 time in total.
Reason: typo

adafruit_support_rick
 
Posts: 14521
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY