Pages: [1]   Go Down
Author Topic: Newb - Trouble Installing Libraries  (Read 300 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm new to Arduino.
I am trying to install a library (Time.h).
I'm following this > http://arduino.cc/en/Guide/Libraries
No matter where I put the files...
Example:
Documents/Arduino/libraries/Time/Time.cpp
Documents/Arduino/libraries/Time/Time.h

I get this error when I try and compile:  'time_t' does not name a type

What am I not doing correctly?

Here's my code (Partial)

#include <Time.h>

const int button1Pin = 2;
const int ledPin =  13;
time_t t = now(); // Store the current time in time variable t
...

Thanks! Robert
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18722
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you restart the IDE after moving the files?
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Nick! Thanks for responding. I did (Restart the IDE - Mac). I still get the same " 'time_t' does not name a type" error when I compile.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok... It complies now. Reason? I copied the files to Documents/libraries/Time and then restarted. In my last post the files were in their original location after being downloaded. So... It looks like your advice (Nick) worked. Now lets see if I can code against the library... Stay tuned ;>
Logged

Pages: [1]   Go Up
Jump to: