Use object in another file without passing it

Hey guys I got a quick question about how to use an object in another file.

I got this object ledHandler led

And I want to use that in another file, but I don't want to pass it to every function.

ledHandler.h:

class ledHandler {
  private:
    Adafruit_NeoPixel strip;

  public:
    enum STATUS_LED {
      connecting,
      disconnected,
      connected,
      updating,
      updating_failed,
      Updated
    };
    STATUS_LED statusLed = disconnected;
    
    ledHandler();
    void begin();
    void setPixelColor(uint8_t r, uint8_t g, uint8_t b, float multiplier = 1.0);
    void switchLedStatus(enum STATUS_LED);
};

Socket.h:

#include <LinkedList.h>
#include <ESP8266WiFi.h> 
#include "ledHandler.h"
#include <SocketIoClient.h> 
#include <WiFiManager.h>

WiFiManager wifiManager;
SocketIoClient webSocket;

LinkedList<String> QUEUE = LinkedList<String>();

/* Declare Server IP !GLOBALY! */
char serverIP[50] = "";
bool shouldSaveConfig = false;

void connectedToServer(const char *payload, size_t length) {
  led->statusLed = ledHandler::connected; // HERE I want to use the led object
  led.switchLedStatus(led.statusLed);
  registerToServer();
}

void disconnectedFromServer(const char *payload, size_t length) {
  led.statusLed = ledHandler::disconnected; // HERE I want to use the led object
  led.switchLedStatus(led.statusLed);
  delay(3000);
}

In the main I create the object:
main.cpp:

ledHandler led; // this object I want to use in the socket.h file

String chipId = generateChipID();                    
String configSSID = String(CONFIG_SSID) + "_" + chipId;  

void setup()
{  
  Serial.begin(115200);
  led.begin();
  led.statusLed = connecting;
  led.switchLedStatus(led.statusLed);

void loop(){}

I read something about extrenal pointers? Is that what I need and how do I use does?

If I've understood well your needs, simply include your external files in the main.cpp and then when you have to use the led Handler object in other files, declare as

extern ledHandler led;

The compiler will find where it is defined.

it's not a good idea to define code in a .h file, your Socket.h. including that file is more than one other file results in duplicate definitions.

those functions should be defined in a separate .cpp file and the corresponding .h should only have function "declarations" and the .h included in other .cpp files that use those functions

extern void connectedToServer(const char *payload, size_t length);

(if you notice, the C++ class in your ledHandler.h is another way of declaring functions)

Thanks for pointing that out! I'm already working on a separate .cpp.
That is normally the way I work anyway, but this is a project I'm picking up from somebody else. So I have some refactoring work to do.