avr-stl icon indicating copy to clipboard operation
avr-stl copied to clipboard

arduino-1.8.7 still supported?

Open frans-fuerst opened this issue 7 years ago • 1 comments

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

frans-fuerst avatar Oct 20 '18 14:10 frans-fuerst

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.

mgmeedendorp avatar Apr 02 '19 14:04 mgmeedendorp