Hello,
I have created two libraries, both with similar functionality but controlling different devices. So I want both libraries to work independently of each other.
Library 1 example:
control1.h
#ifndef control1_h_
#define control1_h_
#include "control1_defines.h"
class control1class
{
};
#endif
control2.h
#ifndef control2_h_
#define control2_h_
#include "control2_defines.h"
class control2class
{
};
#endif
control1_defines.h
#ifndef control1_defines_h
#define control1_defines_h
enum someEnum
{
foo = 0,
bar = 1,
foobie= 2
};
#endif
control2_defines.h
#ifndef control2_defines_h
#define control2_defines_h
enum someEnum
{
foo = 0,
bar = 1,
foobie= 2
};
#endif
The error I get is something like,
In file included from control1.h:14:0,
from myproject.ino:1:
control_PCM5242/control1_defines.h:54:6: note: previous definition here
enum someEnum
Any advice on how I can handle this issue? I don't want to have to rename all the enums to different ones, but I could if I have to. I thought that the classes would stay independent of eachother and therefore work...