Merhaba VSC idesi icinde Platformio kullanarak ESP8266 Wemos d1 r1 üzerinde bir uygulama yapıyorum. Derleme yaptığımda ise aşağıdaki hatayı vermektedir
Aynı programı Arduino ide sinde derlediğimde ise herhangi bir hata vermeden derleme yapmaktadır. Hatta programı en basit haline getirdim.
UpnpBroadcastResponder upnpBroadcastResponder; satırını kapatınca derlemede sorun yok
aktif edince hata mesajını almaktayım.
Neden kaynaklanıyor olabilir.
Not: Ne hikmeste code tag kullanamıyorum. :((
#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:
}
**Buda aldığım hata mesajı**
Scanning dependencies…
Dependency Graph
|-- 1.0
| |-- 1.0
|-- 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 1Preformatted text