avr-stl
avr-stl copied to clipboard
arduino-1.8.7 still supported?
I'm trying to just include <vector> for a basic test and I get the following compiler error:
In file included from /opt/arduino-1.8.7/hardware/tools/avr/avr/include/stl_algobase.h:64:0,
from /opt/arduino-1.8.7/hardware/tools/avr/avr/include/vector:31,
from /tmp/arduino_modified_sketch_766904/sketch_oct20a.ino:1:
/opt/arduino-1.8.7/hardware/tools/avr/avr/include/stl_iterator.h:589:48: error: 'char_traits' does not name a type
class _CharT = char, class _Traits = char_traits<_CharT>,
Can I have done something wrong? What's the most recent supported version of the Arduino-SDK?
I'm on a Fedora 28 system and tried this with a fresh copy of the arduino-1.8.7 SDK
To fix this compiler error include the iterator header before including vector (or deque, or any other container) like so:
#include <iterator>
#include <vector>
You'll also need to include pnew.cpp at the start of your program, before the Arduino.h header is included. Make sure to only include the pnew.cpponce because it has no include guards.