I have a file in this massive project I'm working on called timeKeeper.h (and .c)
--------------EDIT---------------FIXED THE BOOL THING STILL BROKEN THOUGH--------------
#ifndef TIMEKEEPER_H_
#define TIMEKEEPER_H_
#include <time.h>
#include <stdbool.h>
bool isAfter(time_t time);
void setTime(char seconds, char minutes, char hours, char day,
char month, char year);
void tickSeconds(void);
time_t getCurrentTime(void);
time_t createTime(char seconds, char minutes, char hours, char day,
char month, char year);
void startTime(void);
time_t addSeconds(int seconds, time_t time);
long timeRemaining(time_t time);
void rtc_set(char seconds, char minutes, char hours, char days, char months,
char year);
#endif
When I attempt to Build my project, there are a bunch of errors in this file (and any file that is using time.h). Here's some of the errors in timeKeeper.h:
expected ')' before 'time' Line 6
expected '"', ',', ';','asm', or '__attribute__' before 'getCurrentTime' Line 10
I suspect that timeKeeper doesn't know what a time_t is, even though it has
#include <time.h>
I am also getting errors like
implicit declaration of function 'localtime'
in my timeKeeper.c file. And yes, timeKeeper.c #includes timeKeeper.h
Any help is greatly appreciated.
----ADDITIONAL INFORMATION----- I'm using Atmel Studio 6.0 Here is timeKeeper.c
#include "FreeRTOS.h"
#include "task.h"
#include "print_funcs.h"
#include "timeKeeper.h"
#include "telemetryLookup.h"
void timeTask(void* pvParameters);
time_t TIME;
blah blah blah......
----EDIT 2------
I added #include <stdbool.h>
and changed Bool
to bool
in line 6 but the errors are still there.