Getting error after using extern with AsyncMQTT_ESP32 library

I have been trying to develop multi cpp project in platformio and whenever I define “AsyncMqttClient” class object with the “extern” in defines.h and declare it in main.cpp I am getting scarry looking error “…: first defined here” But when I use “AsyncMqttClient” library instead “AsyncMQTT_ESP32”, I am not getting any error. Can you help in this regard?
main.cpp:

#include "defines.h"

const char *PubTopic = "async-mqtt/ESP32_Pub"; // Topic to publish

AsyncMqttClient mqttClient;
TimerHandle_t mqttReconnectTimer;
TimerHandle_t wifiReconnectTimer;

void connectToWifi()
{
  Serial.println("Connecting to Wi-Fi...");
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
}

void connectToMqtt()
{
  Serial.println("Connecting to MQTT...");
  mqttClient.connect();
}

void WiFiEvent(WiFiEvent_t event)
{
  switch (event)
  {
#if USING_CORE_ESP32_CORE_V200_PLUS

  case ARDUINO_EVENT_WIFI_READY:
    Serial.println("WiFi ready");
    break;

  case ARDUINO_EVENT_WIFI_STA_START:
    Serial.println("WiFi STA starting");
    break;

  case ARDUINO_EVENT_WIFI_STA_CONNECTED:
    Serial.println("WiFi STA connected");
    break;

  case ARDUINO_EVENT_WIFI_STA_GOT_IP6:
  case ARDUINO_EVENT_WIFI_STA_GOT_IP:
    Serial.println("WiFi connected");
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
    connectToMqtt();
    break;

  case ARDUINO_EVENT_WIFI_STA_LOST_IP:
    Serial.println("WiFi lost IP");
    break;

  case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
    Serial.println("WiFi lost connection");
    xTimerStop(mqttReconnectTimer, 0); // ensure we don't reconnect to MQTT while reconnecting to Wi-Fi
    xTimerStart(wifiReconnectTimer, 0);
    break;
#else

  case SYSTEM_EVENT_STA_GOT_IP:
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
    connectToMqtt();
    break;

  case SYSTEM_EVENT_STA_DISCONNECTED:
    Serial.println("WiFi lost connection");
    xTimerStop(mqttReconnectTimer, 0); // ensure we don't reconnect to MQTT while reconnecting to Wi-Fi
    xTimerStart(wifiReconnectTimer, 0);
    break;
#endif

  default:
    break;
  }
}

void printSeparationLine()
{
  Serial.println("************************************************");
}

void onMqttConnect(bool sessionPresent)
{
  Serial.print("Connected to MQTT broker: ");
  Serial.print(MQTT_HOST);
  Serial.print(", port: ");
  Serial.println(MQTT_PORT);
  Serial.print("PubTopic: ");
  Serial.println(PubTopic);

  printSeparationLine();
  Serial.print("Session present: ");
  Serial.println(sessionPresent);

  uint16_t packetIdSub = mqttClient.subscribe(PubTopic, 2);
  Serial.print("Subscribing at QoS 2, packetId: ");
  Serial.println(packetIdSub);

  mqttClient.publish(PubTopic, 0, true, "ESP32 Test");
  Serial.println("Publishing at QoS 0");

  uint16_t packetIdPub1 = mqttClient.publish(PubTopic, 1, true, "test 2");
  Serial.print("Publishing at QoS 1, packetId: ");
  Serial.println(packetIdPub1);

  uint16_t packetIdPub2 = mqttClient.publish(PubTopic, 2, true, "test 3");
  Serial.print("Publishing at QoS 2, packetId: ");
  Serial.println(packetIdPub2);

  printSeparationLine();
}

void onMqttDisconnect(AsyncMqttClientDisconnectReason reason)
{
  (void)reason;

  Serial.println("Disconnected from MQTT.");

  if (WiFi.isConnected())
  {
    xTimerStart(mqttReconnectTimer, 0);
  }
}

void onMqttSubscribe(const uint16_t &packetId, const uint8_t &qos)
{
  Serial.println("Subscribe acknowledged.");
  Serial.print("  packetId: ");
  Serial.println(packetId);
  Serial.print("  qos: ");
  Serial.println(qos);
}

void onMqttUnsubscribe(const uint16_t &packetId)
{
  Serial.println("Unsubscribe acknowledged.");
  Serial.print("  packetId: ");
  Serial.println(packetId);
}

void onMqttMessage(char *topic, char *payload, const AsyncMqttClientMessageProperties &properties,
                   const size_t &len, const size_t &index, const size_t &total)
{
  (void)payload;

  Serial.println("Publish received.");
  Serial.print("  topic: ");
  Serial.println(topic);
  Serial.print("  qos: ");
  Serial.println(properties.qos);
  Serial.print("  dup: ");
  Serial.println(properties.dup);
  Serial.print("  retain: ");
  Serial.println(properties.retain);
  Serial.print("  len: ");
  Serial.println(len);
  Serial.print("  index: ");
  Serial.println(index);
  Serial.print("  total: ");
  Serial.println(total);
}

void onMqttPublish(const uint16_t &packetId)
{
  Serial.println("Publish acknowledged.");
  Serial.print("  packetId: ");
  Serial.println(packetId);
}

void setup()
{
  Serial.begin(115200);

  while (!Serial && millis() < 5000)
    ;

  delay(500);

  Serial.print("\nStarting FullyFeature_ESP32 on ");
  Serial.println(ARDUINO_BOARD);
  Serial.println(ASYNC_MQTT_ESP32_VERSION);

  mqttReconnectTimer = xTimerCreate("mqttTimer", pdMS_TO_TICKS(2000), pdFALSE, (void *)0,
                                    reinterpret_cast<TimerCallbackFunction_t>(connectToMqtt));
  wifiReconnectTimer = xTimerCreate("wifiTimer", pdMS_TO_TICKS(2000), pdFALSE, (void *)0,
                                    reinterpret_cast<TimerCallbackFunction_t>(connectToWifi));

  WiFi.onEvent(WiFiEvent);

  mqttClient.onConnect(onMqttConnect);
  mqttClient.onDisconnect(onMqttDisconnect);
  mqttClient.onSubscribe(onMqttSubscribe);
  mqttClient.onUnsubscribe(onMqttUnsubscribe);
  mqttClient.onMessage(onMqttMessage);
  mqttClient.onPublish(onMqttPublish);

  test();

  connectToWifi();
}

void loop()
{
}

defines.h:

/****************************************************************************************************************************
  defines.h
  AsyncMQTT_ESP32 is a library for ESP32 boards using WiFi or LwIP W5500, LAN8720 or ENC28J60

  Based on and modified from :

  1) async-mqtt-client (https://github.com/marvinroger/async-mqtt-client)
  2) async-mqtt-client (https://github.com/khoih-prog/AsyncMQTT_Generic)

  Built by Khoi Hoang https://github.com/khoih-prog/AsyncMQTT_ESP32
 ***************************************************************************************************************************************/

#ifndef defines_h
#define defines_h

#define _ASYNC_MQTT_LOGLEVEL_               1

#include <Arduino.h>
#include <WiFi.h>
#include <AsyncMQTT_ESP32.h>
#include <Test.h>

extern "C"
{
#include "freertos/FreeRTOS.h"
#include "freertos/timers.h"
}

extern AsyncMqttClient mqttClient;
extern TimerHandle_t mqttReconnectTimer;
extern TimerHandle_t wifiReconnectTimer;

//#define MQTT_HOST         IPAddress(192, 168, 2, 110)
#define MQTT_HOST         "broker.emqx.io"        // Broker address
#define MQTT_PORT         1883

#define WIFI_SSID         "Digisol"
#define WIFI_PASSWORD     "12345678"

#endif    //defines_h

Test.h:

#ifndef Test_H
#define Test_H
void test();
#endif

Test.cpp:

#include "defines.h"
void test()
{
    mqttClient.setServer(MQTT_HOST, MQTT_PORT);
}

platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

; [platformio]
; default_envs = ESP32

[env:esp32dev]
; [env:ESP32]
platform = espressif32
; board = esp32doit-devkit-v1
board = esp32dev
framework = arduino
lib_deps = khoih-prog/AsyncMQTT_ESP32@^1.10.0
lib_ignore = WebServer_ESP32_SC_ENC, WebServer_ESP32_SC_W5500, WebServer_ESP32_SC_W6100
lib_compat_mode = strict
lib_ldf_mode = deep+
monitor_speed = 115200
; monitor_filters = esp32_exception_decoder

Error:

c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setKeepAlive(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AseepAlive(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsySP32_Impl.h:201: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setClientId(char const*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AslientId(char const*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQ_Impl.h:210: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setCleanSession(bool)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsleanSession(bool)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_pl.h:219: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setMaxTopicLength(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsaxTopicLength(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\ProjectQTT_ESP32_Impl.h:228: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setCredentials(char const*, char const*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asredentials(char const*, char const*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\/AsyncMQTT_ESP32_Impl.h:239: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setWill(char const*, unsigned char, bool, char const*, unsigned int)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asill(char const*, unsigned char, bool, char const*, unsigned int)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\Onesp32dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:250: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setServer(IPAddress, unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Aserver(IPAddress, unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\ProjncMQTT_ESP32_Impl.h:263: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::setServer(char const*, unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Aserver(char const*, unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\PrsyncMQTT_ESP32_Impl.h:274: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_freeCurrentParsedPacket()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AseCurrentParsedPacket()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\Async32_Impl.h:359: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPingResp()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsingResp()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Te: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_handleQueue()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsdleQueue()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 T0: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onAck(unsigned int)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asck(unsigned int)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_El.h:464: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_insert(AsyncMqttClientInternals::OutPacket*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asert(AsyncMqttClientInternals::OutPacket*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\Platfo2/src/AsyncMQTT_ESP32_Impl.h:659: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPubRec(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsPubRec(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\Async32_Impl.h:1089: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_addFront(AsyncMqttClientInternals::OutPacket*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsFront(AsyncMqttClientInternals::OutPacket*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatP32/src/AsyncMQTT_ESP32_Impl.h:682: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onConnect()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asonnect()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Tes first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_addBack(AsyncMqttClientInternals::OutPacket*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsBack(AsyncMqttClientInternals::OutPacket*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\Platf32/src/AsyncMQTT_ESP32_Impl.h:707: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_clearQueue(bool)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsarQueue(bool)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP3:804: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_clear()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asar()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pst defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_sendPing()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsndPing()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Tes: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::connected() const':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asnected() const'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESPh:1147: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::connect()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asnect()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/
first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::disconnect(bool)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asconnect(bool)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP3:1255: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPoll()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asoll()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.rst defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::subscribe(char const*, unsigned char)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asscribe(char const*, unsigned char)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\PrsyncMQTT_ESP32_Impl.h:1277: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::unsubscribe(char const*)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asubscribe(char const*)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncM2_Impl.h:1291: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::publish(char const*, unsigned char, bool, char const*, unsigned int, bool, unsigned s
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Aslish(char const*, unsigned char, bool, char const*, unsigned int, bool, unsigned short)'; .pio\build\esp32dev\src\Test.SP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:1306: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::clearQueue()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsarQueue()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Te5: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::getClientId() const':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsClientId() const'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_El.h:1337: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onDisconnect()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asisconnect()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 35: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onConnAck(bool, unsigned char)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsonnAck(bool, unsigned char)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\T_ESP32_Impl.h:887: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onSubAck(unsigned short, char)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsubAck(unsigned short, char)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\T_ESP32_Impl.h:919: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onUnsubAck(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsnsubAck(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsynP32_Impl.h:943: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onMessage(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsig
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asessage(char*, char*, unsigned char, bool, bool, unsigned int, unsigned int, unsigned int, unsigned short)'; .pio\build\ojects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:968: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPublish(unsigned short, unsigned char)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asublish(unsigned short, unsigned char)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIOc/AsyncMQTT_ESP32_Impl.h:998: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPubRel(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsPubRel(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\Async32_Impl.h:1042: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPubAck(unsigned short)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsPubAck(unsigned short)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\Async32_Impl.h:1072: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onPubComp(unsigned short)':
main.cpp:(.text._ZN15AsyncMqttClient10_onPubCompEt+0x0): multiple definition of `AsyncMqttClient::_onPubComp(unsigned sttClient10_onPubCompEt+0x0): first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::_onData(char*, unsigned int)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asata(char*, unsigned int)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsySP32_Impl.h:473: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::AsyncMqttClient()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsMqttClient()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP3255: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::AsyncMqttClient()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsMqttClient()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP3255: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onUnsubscribe(std::function<void (unsigned short)>)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Assubscribe(std::function<void (unsigned short)>)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\T_ESP32/src/AsyncMQTT_ESP32_Impl.h:332: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onPublish(std::function<void (unsigned short)>)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asblish(std::function<void (unsigned short)>)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatP32/src/AsyncMQTT_ESP32_Impl.h:350: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onSubscribe(std::function<void (unsigned short, unsigned char)>)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asbscribe(std::function<void (unsigned short, unsigned char)>)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDri2dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:323: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onConnect(std::function<void (bool)>)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asnnect(std::function<void (bool)>)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\ProyncMQTT_ESP32_Impl.h:305: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onDisconnect(std::function<void (AsyncMqttClientDisconnectReason)>)':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Assconnect(std::function<void (AsyncMqttClientDisconnectReason)>)'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\Onesp32dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:314: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::onMessage(std::function<void (char*, char*, AsyncMqttClientMessageProperties, unsigne
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/Asssage(std::function<void (char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int)>)';latformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsyncMQTT_ESP32_Impl.h:341: first def
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::~AsyncMqttClient()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsncMqttClient()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESPh:185: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o: in function `AsyncMqttClient::~AsyncMqttClient()':
C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/src/AsncMqttClient()'; .pio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESPh:185: first defined here
c:/users/shubh/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/...o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdeps/esp32dev/AsyncMQTT_ESP32/srcio\build\esp32dev\src\Test.cpp.o:C:\Users\shubh\OneDrive\Documents\PlatformIO\Projects\AsyncMQTT_ESP32 Test/.pio/libdep here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
================================================================================ [FAILED] Took 57.24 seconds ==========

Can you upload the full project with the platformio.ini?

I have uploaded the platformio.ini and Error, please check them.