dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
508 stars 119 forks source link

expected ')' before '&' token #100

Closed duckati closed 2 years ago

duckati commented 2 years ago

I get this error simply by checking the "nano33iot" example. I checked with both Arduino Create and Arduino IDE 1.8.19. Following the log:

Arduino: 1.8.19 (Windows 10), Board: "Arduino NANO 33 IoT"

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HASwitch.cpp: 5: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HAFan.cpp: 4: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HABinarySensor.cpp: 5: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HASensor.cpp: 8: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ BaseDeviceType.cpp: 2: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HAHVAC.cpp: 5: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HACover.cpp: 4: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

In file included from C: \ Arduino \ libraries \ home-assistant-integration \ src \ device-types \ HATagScanner.cpp: 5: 0:

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 23: 18: error: expected ')' before '&' token

 HAMqtt (Client & netClient, HADevice & device);

              ^

c: \ arduino \ libraries \ home-assistant-integration \ src \ hamqtt.h: 224: 5: error: 'Client' does not name a type; did you mean 'DNSClient'?

 Client & _netClient;

 ^ ~~~~~

 DNSClient

exit status 1

Error when compiling for the Arduino NANO 33 IoT board.

dawidchyrzynski commented 2 years ago

https://github.com/dawidchyrzynski/arduino-home-assistant/issues/82