<string>をincludeするとコンパイルエラーになる
SpresenseのArduino Platformで、std::string
クラスを使おうと思い、#include <string>
したところコンパイルエラーが発生しました。
C++標準ライブラリですが、利用不可でしょうか?
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>
^
(Sony developer forumにもポストしています)