|
发表于 2017-9-4 18:27:19
|
显示全部楼层
ESPsonoff_POW-v1.01:76: error: no matching function for call to 'PubSubClient:ubSubClient(WiFiClient&, const char [14], int)'
PubSubClient mqttClient(wifiClient, MQTT_SERVER, MQTT_PORT);
^
C:\ESPsonoff_POW-v1.01\ESPsonoff_POW-v1.01.ino:76:59: note: candidates are:
In file included from C:\ESPsonoff_POW-v1.01\ESPsonoff_POW-v1.01.ino:35:0:
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:117:4: note: PubSubClient:ubSubClient(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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:117:4: note: candidate expects 5 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:116:4: note: PubSubClient:ubSubClient(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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:116:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:115:4: note: PubSubClient:ubSubClient(const char*, uint16_t, Client&, Stream&)
PubSubClient(const char*, uint16_t, Client& client, Stream&);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:115:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:114:4: note: PubSubClient:ubSubClient(const char*, uint16_t, Client&)
PubSubClient(const char*, uint16_t, Client& client);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:114:4: note: no known conversion for argument 1 from 'WiFiClient' to 'const char*'
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:113:4: note: PubSubClient:ubSubClient(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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:113:4: note: candidate expects 5 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:112:4: note: PubSubClient:ubSubClient(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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:112:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:111:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, Client&, Stream&)
PubSubClient(uint8_t *, uint16_t, Client& client, Stream&);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:111:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:110:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, Client&)
PubSubClient(uint8_t *, uint16_t, Client& client);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:110:4: note: no known conversion for argument 1 from 'WiFiClient' to 'uint8_t* {aka unsigned char*}'
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:109:4: note: PubSubClient:ubSubClient(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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:109:4: note: candidate expects 5 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:108: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\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:108:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:107:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&, Stream&)
PubSubClient(IPAddress, uint16_t, Client& client, Stream&);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:107:4: note: candidate expects 4 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:106:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&)
PubSubClient(IPAddress, uint16_t, Client& client);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:106:4: note: no known conversion for argument 1 from 'WiFiClient' to 'IPAddress'
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:105:4: note: PubSubClient::PubSubClient(Client&)
PubSubClient(Client& client);
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:105:4: note: candidate expects 1 argument, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:104:4: note: PubSubClient::PubSubClient()
PubSubClient();
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:104:4: note: candidate expects 0 arguments, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:84:7: note: PubSubClient::PubSubClient(const PubSubClient&)
class PubSubClient {
^
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:84:7: note: candidate expects 1 argument, 3 provided
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:84:7: note: PubSubClient::PubSubClient(PubSubClient&&)
C:\Users\chinesekongfu\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:84:7: note: candidate expects 1 argument, 3 provided
ESPsonoff_POW-v1.01:80: error: 'MQTT' does not name a type
void callback(const MQTT::Publish& pub) {
^
ESPsonoff_POW-v1.01:80: error: expected unqualified-id before '&' token
void callback(const MQTT::Publish& pub) {
^
ESPsonoff_POW-v1.01:80: error: expected ')' before '&' token
ESPsonoff_POW-v1.01:80: error: expected initializer before 'pub'
void callback(const MQTT::Publish& pub) {
^
ESPsonoff_POW-v1.01:80: error: 'MQTT' does not name a type
void callback(const MQTT::Publish& pub) {
^
ESPsonoff_POW-v1.01:80: error: expected unqualified-id before '&' token
void callback(const MQTT::Publish& pub) {
^
ESPsonoff_POW-v1.01:80: error: expected ')' before '&' token
ESPsonoff_POW-v1.01:80: error: expected initializer before 'pub'
void callback(const MQTT::Publish& pub) {
^
exit status 1
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, const char [14], int)'
|
|