Hello I am doing an application on ESP8266 Wemos d1 r1 using Platformio. When I compile, I get the following error message.
When I compile the same code with Arduino ide, it does not give an error.
What could be the mistake.
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiUdp.h>
#include <functional>
#include "switch.h"
#include "UpnpBroadcastResponder.h"
#include "CallbackFunction.h"
/*===========================================================================
GPIO PINS
===========================================================================*/
const int relayPin1 = 13; // Living Room One
const int relayPin2 = 12; //
const int relayPin3 = 14; //
const int relayPin4 = 16; // LivingRoomTv
/*===========================================================================
WIFI SSID AND PASSWORD
===========================================================================*/
const char* ssid = "xxxxxxxx"; //type your ssid
const char* password = "xxxxx"; //type your password
/*============================================================================
prototypes
===========================================================================*/
boolean connectWifi();
bool officeLightsOn();
bool officeLightsOff();
bool kitchenLightsOn();
bool kitchenLightsOff();
boolean wifiConnected = false;
UpnpBroadcastResponder upnpBroadcastResponder;
/*=========================================================================
SETUP
===========================================================================*/
void setup()
{
}
/*=======================================================================
LOOP
========================================================================*/
void loop()
{
// put your main code here, to run repeatedly:
}
Error Message:
Scanning dependencies...
Dependency Graph
|-- <ESP8266WebServer> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
Building in release mode
Linking .pio\build\d1\firmware.elf
c:/users/hikmet/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\d1\src\main.cpp.o:(.text.startup._GLOBAL__sub_I_ssid+0x8): undefined reference to `UpnpBroadcastResponder::UpnpBroadcastResponder()'
c:/users/hikmet/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\d1\src\main.cpp.o: in function `_GLOBAL__sub_I_ssid':
main.cpp:(.text.startup._GLOBAL__sub_I_ssid+0x15): undefined reference to `UpnpBroadcastResponder::UpnpBroadcastResponder()'
c:/users/hikmet/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\d1\src\main.cpp.o:(.text.exit._GLOBAL__sub_D_ssid+0x0): undefined reference to `UpnpBroadcastResponder::~UpnpBroadcastResponder()'
c:/users/hikmet/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\d1\src\main.cpp.o: in function `_GLOBAL__sub_D_ssid':
main.cpp:(.text.exit._GLOBAL__sub_D_ssid+0x13): undefined reference to `UpnpBroadcastResponder::~UpnpBroadcastResponder()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\d1\firmware.elf] Error 1