esp32-arduino-matter icon indicating copy to clipboard operation
esp32-arduino-matter copied to clipboard

Default examples not working

Open zhekch opened this issue 1 year ago • 5 comments

When attempting to run the default examples, they all fail to compile. I get this error with the light example. (this is only the last part of the error, as it is too big so i didnt paste it here)

/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'nullable<T>::nullable(T) [with T = unsigned char]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_feature.h:100:88:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:184:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<unsigned char, false>'
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'nullable<T>::nullable(T) [with T = short int]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_cluster.h:385:106:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:184:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<short int, false>'
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'void nullable<T>::operator=(T) [with T = unsigned char]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/examples/Light/Light.ino:73:50:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:218:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<unsigned char, false>'
         if (chip::app::NumericAttributeTraits<T>::IsNullValue(value)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

exit status 1

Compilation error: exit status 1

zhekch avatar Sep 16 '23 20:09 zhekch

Can you send full config? Which board is selected in Arduino IDE? Did you enable C++17 for Arduino IDE? What version of ESP32 boards are you using?

Yacubane avatar Sep 17 '23 21:09 Yacubane

Here is my board config: Screenshot 2023-09-24 at 10 28 36 I believe enabling c++ is a windows feature, while im on mac, and what exactly do you mean by a version of a board?

zhekch avatar Sep 24 '23 08:09 zhekch

Managed to get it to compile: you MUST use the C++17 modification as mentioned in the readme. I also struggled to get it to compile on my Mac (Ventura 13.6) but C++ is not a windows-only feature :)

WillemJoosten avatar Sep 29 '23 06:09 WillemJoosten

@zhekch did you manage to solve this issue? As @WillemJoosten said, C++ is not a windows-only feature 😊

Yacubane avatar Nov 26 '23 22:11 Yacubane

Got this error on my Mac Book Pro with platformio: 'OnOff' has not been declared

I added to the platform.ini as described in the readme:

build_unflags=-std=gnu++11 build_flags =

It won't recognize these classes

  • OnOff
  • attribute_t

plus other names.

Thanks

Martenz avatar Jul 22 '24 00:07 Martenz