Just received the WIO Terminal today and running through the tutorials and samples. So far all is well but I’ve hit a snag on the Seeed Line Chart library.
The chart library example would not compile and the primary errors I received was "
seeed_line_chart.h:235:38: note: deduced return type only available with -std=c++14 or -std=gnu++14"
I know what this means and I fixed that by going into the platform.txt for the WIO Terminal and setting the compiler.cpp.flags to use -std=gnu++14.
I still get a great deal of warnings but the code compiles and it does seem to work.
My question is am I the only one seeing this problem? Oddly enough the histogram library compiles just fine (as do all the others so far). The Line Chart is the odd man out.
Hi @Dennis_Mabrey
We are currently working on this, thanks for your support
Thanks
Ok thanks for the confirmation. It still works once you change the compiler to C++14. So far this is a great little device.
1 Like
Same problem here. I was puzzled by why this sketch for the IMU wasn’t compiling - https://wiki.seeedstudio.com/Wio-Terminal-Displaying-Gyro/ then found your fix for the WIO Terminal Line Chart library - Good work Dennis - now Seeed’s code compiles and runs fine for me, thanks. First had to update the board library from V1.7.2 to V1.7.5. By the way, the platform.txt file is in folder (installed user)\appdata\local\arduino15\packages\seeeduino\hardware\samd\1.7.5. Your fix worked in both Windows 7 and 10.
1 Like
Great glad it is working. That library includes a lot of C++ code that uses auto return type deduction (the compiler deduces what type the function returns… you use this primarily in template functions).
Auto return type deduction didn’t come around until C++14.
Thanks for posting the path to platform.txt. I should have posted that. Silly me.
1 Like
Thanks for the background lesson on auto return type deduction - that sounds useful. Also, wasn’t aware that C++14 code could be used in Arduino. The Wio Terminal has 32k SRAM vs only 2K SRAM in Arduinos. Does make sense to test a more recent C++ version on the merits of a desired coding feature.
For anyone using PlatformIO, the options
build_unflags = -std=gnu++11
build_flags = -std=gnu++14
in the project platformio.ini work for me.