I'm trying to compile a binary with avr-g++
using this tutorial for UART, but during compilation, I get the following error:
main.cpp:50:20: error: designator order for field '__file::flags' does not match declaration order in 'FILE'
50 | FILE uart_output = FDEV_SETUP_STREAM(uart_putchar, NULL, _FDEV_SETUP_WRITE);
I've made sure that I'm using /usr/avr/include/stdio.h
, and attempted to use C++20 in light of the following:
Why does C++11 not support designated initializer lists as C99?
Yet I have not been able to have any success in compiling (or even understanding the problem). I have also attempted to replicate the example in the avr stdio.h
implementation source file (line 152) but also had no success.
Any help is greatly appreciated. Thanks in advance.