Advertisement
irmecir

compile_error

Oct 10th, 2017
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. Googlesheet_DHT_simple:88: error: conflicting declaration 'HTTPSRedirect* client'
  11.  
  12. HTTPSRedirect* client = nullptr;
  13.  
  14. ^
  15.  
  16. Googlesheet_DHT_simple:13: error: 'client' has a previous declaration as 'WiFiClientSecure client'
  17.  
  18. WiFiClientSecure client;
  19.  
  20. ^
  21.  
  22. C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino: In function 'void loop()':
  23.  
  24. Googlesheet_DHT_simple:139: error: no match for 'operator=' (operand types are 'WiFiClientSecure' and 'HTTPSRedirect*')
  25.  
  26. client = new HTTPSRedirect(httpsPort);
  27.  
  28. ^
  29.  
  30. C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:139:12: note: candidate is:
  31.  
  32. In file included from C:\Users\hossein\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41:0,
  33.  
  34. from C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:1:
  35.  
  36. C:\Users\hossein\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClientSecure.h:36:21: note: WiFiClientSecure& WiFiClientSecure::operator=(const WiFiClientSecure&)
  37.  
  38. WiFiClientSecure& operator=(const WiFiClientSecure&);
  39.  
  40. ^
  41.  
  42. C:\Users\hossein\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClientSecure.h:36:21: note: no known conversion for argument 1 from 'HTTPSRedirect*' to 'const WiFiClientSecure&'
  43.  
  44. Googlesheet_DHT_simple:141: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  45.  
  46. client->setPrintResponseBody(true); // or false and use String getResponseBody();
  47.  
  48. ^
  49.  
  50. Googlesheet_DHT_simple:142: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  51.  
  52. client->setContentTypeHeader("application/json");
  53.  
  54. ^
  55.  
  56. Googlesheet_DHT_simple:143: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  57.  
  58. if (!client->connected()) client->connect(host, httpsPort);
  59.  
  60. ^
  61.  
  62. Googlesheet_DHT_simple:143: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  63.  
  64. if (!client->connected()) client->connect(host, httpsPort);
  65.  
  66. ^
  67.  
  68. Googlesheet_DHT_simple:150: error: no match for 'operator!=' (operand types are 'WiFiClientSecure' and 'std::nullptr_t')
  69.  
  70. if (client != nullptr){
  71.  
  72. ^
  73.  
  74. C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:150:16: note: candidates are:
  75.  
  76. In file included from C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:13:0,
  77.  
  78. from C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:10,
  79.  
  80. from C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:2:
  81.  
  82. C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/JsonVariantComparisons.hpp:27:13: note: template<class TVariant, class TComparand> bool ArduinoJson::operator!=(const ArduinoJson::JsonVariantBase<T>&, TComparand)
  83.  
  84. inline bool operator!=(const JsonVariantBase<TVariant> &variant,
  85.  
  86. ^
  87.  
  88. C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/JsonVariantComparisons.hpp:27:13: note: template argument deduction/substitution failed:
  89.  
  90. C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:150:19: note: 'WiFiClientSecure' is not derived from 'const ArduinoJson::JsonVariantBase<T>'
  91.  
  92. if (client != nullptr){
  93.  
  94. ^
  95.  
  96. In file included from C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:13:0,
  97.  
  98. from C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:10,
  99.  
  100. from C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:2:
  101.  
  102. C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/JsonVariantComparisons.hpp:36:1: note: template<class TVariant, class TComparand> typename ArduinoJson::TypeTraits::EnableIf<(! ArduinoJson::TypeTraits::IsVariant<TComparand>::value), bool>::type ArduinoJson::operator!=(TComparand, const ArduinoJson::JsonVariantBase<T>&)
  103.  
  104. operator!=(TComparand comparand, const JsonVariantBase<TVariant> &variant) {
  105.  
  106. ^
  107.  
  108. C:\Users\hossein\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/JsonVariantComparisons.hpp:36:1: note: template argument deduction/substitution failed:
  109.  
  110. C:\Users\hossein\Videos\Googlesheet_DHT_simple-master\Googlesheet_DHT_simple\Googlesheet_DHT_simple.ino:150:19: note: mismatched types 'const ArduinoJson::JsonVariantBase<T>' and 'std::nullptr_t'
  111.  
  112. if (client != nullptr){
  113.  
  114. ^
  115.  
  116. Googlesheet_DHT_simple:151: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  117.  
  118. if (!client->connected()){
  119.  
  120. ^
  121.  
  122. Googlesheet_DHT_simple:152: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  123.  
  124. client->connect(host, httpsPort);
  125.  
  126. ^
  127.  
  128. Googlesheet_DHT_simple:161: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  129.  
  130. if (client->GET(url + String("readrow=last"), host)){
  131.  
  132. ^
  133.  
  134. Googlesheet_DHT_simple:163: error: base operand of '->' has non-pointer type 'WiFiClientSecure'
  135.  
  136. JsonObject& json = jsonBuffer.parseObject(client->getResponseBody());
  137.  
  138. ^
  139.  
  140. Googlesheet_DHT_simple:254: error: type 'class WiFiClientSecure' argument given to 'delete', expected pointer
  141.  
  142. delete client;
  143.  
  144. ^
  145.  
  146. exit status 1
  147. conflicting declaration 'HTTPSRedirect* client'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement