Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
std::string class
-
Hi,
I want to std::string class with spresense in Arduino Platform.
But I got error.Could you tell me how to fix?
Code:
#include <string> void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
Error message:
In file included from c:\users\takashi\documents\arduinodata\packages\spresense\tools\gcc-arm-none-eabi\5.4.1\windows\arm-none-eabi\include\c++\5.4.1\bits\stl_algobase.h:61:0, from c:\users\takashi\documents\arduinodata\packages\spresense\tools\gcc-arm-none-eabi\5.4.1\windows\arm-none-eabi\include\c++\5.4.1\bits\char_traits.h:39, from c:\users\takashi\documents\arduinodata\packages\spresense\tools\gcc-arm-none-eabi\5.4.1\windows\arm-none-eabi\include\c++\5.4.1\string:40, from C:\Users\takashi\AppData\Local\Temp\arduino_modified_sketch_278803\sketch_jul17a.ino:1: c:\users\takashi\documents\arduinodata\packages\spresense\tools\gcc-arm-none-eabi\5.4.1\windows\arm-none-eabi\include\c++\5.4.1\bits\cpp_type_traits.h:168:12: error: redefinition of 'struct std::__is_integer<unsigned char>' struct __is_integer<unsigned char> ^ c:\users\takashi\documents\arduinodata\packages\spresense\tools\gcc-arm-none-eabi\5.4.1\windows\arm-none-eabi\include\c++\5.4.1\bits\cpp_type_traits.h:147:12: error: previous definition of 'struct std::__is_integer<unsigned char>' struct __is_integer<bool> ^
FYI
Including <string> causes 'redefinition' error of std-lib functions [closed]