DaKaZ / esp8266-restclient

Arduino RESTful HTTP Request Library
MIT License
124 stars 26 forks source link

undefined reference to `RestClient::begin(unsigned char*) #7

Closed derchirurg closed 5 years ago

derchirurg commented 6 years ago

Hi,

I get the following error when using (compiling with) the library: undefined reference to `RestClient::begin(unsigned char*)

How can I fix it?

DaKaZ commented 6 years ago

Can you post any more code or a more complete stack trace? I don't have enough information to answer your question. Thanks

derchirurg commented 6 years ago

Stack:

Archiving built core (caching) in: C:\Users\mm\AppData\Local\Temp\arduino_cache_795941\core\core_esp8266_esp8266_d1_mini_CpuFrequency_80,UploadSpeed_921600,FlashSize_4M3M_ebde0b69c06017d77a526156b32cdc78.a libraries\esp8266-restclient\RestClient.cpp.o: In function `RestClient::RestClient(char const*, int)':

D:\mm\Documents\Arduino\libraries\esp8266-restclient/RestClient.cpp:80: undefined reference to `RestClient::begin(unsigned char*)'

libraries\esp8266-restclient\RestClient.cpp.o: In function `RestClient::dhcp()':

D:\mm\Documents\Arduino\libraries\esp8266-restclient/RestClient.cpp:80: undefined reference to `RestClient::begin(unsigned char*)'

collect2.exe: error: ld returned 1 exit status

Mehrere Bibliotheken wurden für "Ethernet.h" gefunden Benutzt: C:\Users\mm\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\Ethernet Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\Ethernet exit status 1 Fehler beim Kompilieren für das Board WeMos D1 R2 & mini.

derchirurg commented 6 years ago

I think the issue is: RestClient.cpp does not implement begin(...)

DaKaZ commented 6 years ago

Can you check the contents of D:\mm\Documents\Arduino\libraries\esp8266-restclient/RestClient.cpp to make sure it matches this library's RestClient.cpp? Our line 80 is very different than what your error is reporting.

derchirurg commented 6 years ago

If I check your RestClient.cpp at master branch, the method begin() is missing. So this cannot compile. I'm now using this lib: https://github.com/fabianofranca/ESP8266RestClient

ProximaB commented 6 years ago

So first you're writing code then check if library support it. 🤔

derchirurg commented 6 years ago

Don't understand. The library does not compile at all. I just give it a try. I expected the lib will compile if it is checked in. I did not review the code.

DaKaZ commented 5 years ago

Not sure there is anything that needs to be done here. Please create a new issue if you need additional help.

Thanks