Hello all!! Was hoping someone could help me see here… In the following basic structure, I get multiple definitions of ‘server’ errors when compiling but I can’t see why, maybe someone could school me please?
main.cpp:
#include “CommonFunc.h”
void setup() {}
void loop() {}
CommonFunc.h
#ifndef CommonFunc_h
#define CommonFunc_h
#include “PreProcessorDefs.h”class CommonFunc { public: CommonFunc(); ~CommonFunc(); private: };
#endif
CommonFunc.cpp:
#include “CommonFunc.h”
CommonFunc::CommonFunc(){}
CommonFunc::~CommonFunc(){}
void CommonFunc::handleRoot() {}
PreProcessorDefs.h:
#ifndef PreProcDefs_h
#define PreProcDefs_h
#include <ESP8266WebServer.h>
ESP8266WebServer server(80);
#endif