Multiple definitions from nested includes

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

No. You can’t create and share a global variable this way when a header is included by multiple .cpp files. The header needs to have extern ESP8266WebServer server; here as declaration-only instead of the variable creation and you must create a .cpp file (say e.g., global_vars.cpp in which you #include <PreProcessorDefs.h> ESP8266WebServer server(80); to define the variable.

Global variable creation and sharing has been discussed over and over, e.g. A new PlatformIO user coding wrong, getting multiple definition & first defined here errors - #2 by maxgerhardt