suculent / thinx-aes-lib

AES wrapper for ESP8266/ESP32/Arduino/nRF5x
Other
113 stars 39 forks source link

Build issue on ARM Cortex M0 (SAMD Architecture) #77

Open varunm99 opened 3 weeks ago

varunm99 commented 3 weeks ago

Building for an M0-based board (Adafruit Trinket M0 with ATSAMD21 processor) fails asstd::string is referenced but not included. The following error message is produced:

In file included from src/main.cpp:2:
.pio/libdeps/adafruit_trinket_m0/AESLib/src/AESLib.h:67:10: error: 'string' in namespace 'std' does not name a type
   67 |     std::string intToHex(uint8_t intValue);
      |          ^~~~~~
In file included from src/main.cpp:2:
.pio/libdeps/adafruit_trinket_m0/AESLib/src/AESLib.h:22:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
   21 | #include <unistd.h>
  +++ |+#include <string>
   22 | 

Specifically line 9 prevents inclusion of the mentioned library.

This behavior is observed on both the medium example (on Arduino IDE) and the platformio example (on PlatformIO).

Is this expected, or a bug?

suculent commented 3 weeks ago

The library has not been tested on ARM Cortex M0, it is supposed to be used on much weaker legacy MCUs. i suggest to use something more robust instead. M. 10. 6. 2024 v 22:39, Varun Madabushi @.***>: Building for an M0-based board (Adafruit Trinket M0 with ATSAMD21 processor) fails asstd::string is referenced but not included. The following error message is produced: In file included from src/main.cpp:2: .pio/libdeps/adafruit_trinket_m0/AESLib/src/AESLib.h:67:10: error: 'string' in namespace 'std' does not name a type 67 | std::string intToHex(uint8_t intValue); | ^~ In file included from src/main.cpp:2: .pio/libdeps/adafruit_trinket_m0/AESLib/src/AESLib.h:22:1: note: 'std::string' is defined in header ''; did you forget to '#include '? 21 | #include +++ |+#include 22 |

Specifically line 9 prevents inclusion of the mentioned library. This behavior is observed on both the medium example (on Arduino IDE) and the platformio example (on PlatformIO). Is this expected, or a bug?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>