Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while executing #5

Open
karthikjece opened this issue May 20, 2018 · 0 comments
Open

Error while executing #5

karthikjece opened this issue May 20, 2018 · 0 comments

Comments

@karthikjece
Copy link

Arduino: 1.8.5 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Build options changed, rebuilding all
Mqtt_1:21: error: no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, IPAddress&, int)'

PubSubClient client(wclient, server,1883);

                                     ^

C:\Users\karthik\Desktop\Code Testing\Mqtt_1\Mqtt_1.ino:21:41: note: candidates are:

In file included from C:\Users\karthik\Desktop\Code Testing\Mqtt_1\Mqtt_1.ino:10:0:

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:116:4: note: PubSubClient::PubSubClient(const char*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:116:4: note: candidate expects 5 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:115:4: note: PubSubClient::PubSubClient(const char*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:115:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:114:4: note: PubSubClient::PubSubClient(const char*, uint16_t, Client&, Stream&)

PubSubClient(const char*, uint16_t, Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:114:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:113:4: note: PubSubClient::PubSubClient(const char*, uint16_t, Client&)

PubSubClient(const char*, uint16_t, Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:113:4: note: no known conversion for argument 1 from 'WiFiClient' to 'const char*'

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:112:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:112:4: note: candidate expects 5 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:111:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:111:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:110:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, Client&, Stream&)

PubSubClient(uint8_t *, uint16_t, Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:110:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:109:4: note: PubSubClient::PubSubClient(uint8_t*, uint16_t, Client&)

PubSubClient(uint8_t *, uint16_t, Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:109:4: note: no known conversion for argument 1 from 'WiFiClient' to 'uint8_t* {aka unsigned char*}'

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:108:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:108:4: note: candidate expects 5 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:107:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:107:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:106:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&, Stream&)

PubSubClient(IPAddress, uint16_t, Client& client, Stream&);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:106:4: note: candidate expects 4 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:105:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&)

PubSubClient(IPAddress, uint16_t, Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:105:4: note: no known conversion for argument 1 from 'WiFiClient' to 'IPAddress'

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:104:4: note: PubSubClient::PubSubClient(Client&)

PubSubClient(Client& client);

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:104:4: note: candidate expects 1 argument, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:103:4: note: PubSubClient::PubSubClient()

PubSubClient();

^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:103:4: note: candidate expects 0 arguments, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:83:7: note: PubSubClient::PubSubClient(const PubSubClient&)

class PubSubClient {

   ^

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:83:7: note: candidate expects 1 argument, 3 provided

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:83:7: note: PubSubClient::PubSubClient(PubSubClient&&)

C:\Users\karthik\Documents\Arduino\libraries\pubsubclient-master\src/PubSubClient.h:83:7: note: candidate expects 1 argument, 3 provided

Mqtt_1:30: error: 'MQTT' does not name a type

void callback(const MQTT::Publish& pub) {

                 ^

Mqtt_1:30: error: expected unqualified-id before '&' token

void callback(const MQTT::Publish& pub) {

                              ^

Mqtt_1:30: error: expected ')' before '&' token

Mqtt_1:30: error: expected initializer before 'pub'

void callback(const MQTT::Publish& pub) {

                                ^

Mqtt_1:30: error: 'MQTT' does not name a type

void callback(const MQTT::Publish& pub) {

                 ^

Mqtt_1:30: error: expected unqualified-id before '&' token

void callback(const MQTT::Publish& pub) {

                              ^

Mqtt_1:30: error: expected ')' before '&' token

Mqtt_1:30: error: expected initializer before 'pub'

void callback(const MQTT::Publish& pub) {

                                ^

exit status 1
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, IPAddress&, int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant