problem compiling RTClib

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

problem compiling RTClib

Postby Mark Snaterse » Mon May 14, 2012 4:28 pm

I am having a problem compiling RTClib. I am using Arduino 1.0, and have downloaded the latest version of the library (from https://github.com/adafruit/RTClib). Below is the error I am getting. Any pointers in the right direction would be appreciated!

In file included from sketch_may14a.cpp:1:
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:7: error: expected `)' before 't'
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:8: error: expected `)' before 'year'
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:11: error: 'uint16_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:12: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:13: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:14: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:15: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:16: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:17: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:22: error: 'uint32_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:25: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:31: error: 'uint8_t' does not name a type
C:\Documents and Settings\~\My Documents\Arduino\libraries\RTClib/RTClib.h:33: error: 'uint8_t' does not name a type
Mark Snaterse
 
Posts: 2
Joined: Fri Mar 04, 2011 2:35 pm

Re: problem compiling RTClib

Postby adafruit_support_rick » Mon May 14, 2012 4:47 pm

You seem to missing a header file. Check that you have all the necessary #include statements at the top of your sketch.
User avatar
adafruit_support_rick
 
Posts: 2891
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: problem compiling RTClib

Postby pburgess » Mon May 14, 2012 4:51 pm

Hi Mark,

Is this with the ds1307 example sketch included with the library, or in your own code?

If your own code, make sure you're also including this file at the top of your sketch:
Code: Select all
#include <Wire.h>
User avatar
pburgess
 
Posts: 1331
Joined: Sun Oct 26, 2008 1:29 am

Re: problem compiling RTClib

Postby Mark Snaterse » Mon May 14, 2012 5:02 pm

Thanks!
Mark Snaterse
 
Posts: 2
Joined: Fri Mar 04, 2011 2:35 pm

Re: problem compiling RTClib

Postby platezero » Tue Jun 26, 2012 4:41 pm

Thank you very much pburgess.

error: 'uint8_t' does not name a type
solved by include command

#include <Wire.h>

it's Work! :wink:
platezero
 
Posts: 1
Joined: Tue Jun 26, 2012 4:31 pm


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: No registered users and 11 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]