Closed romanchyla closed 9 years ago
this helped me fill the gap: https://github.com/WeAreLeka/Arduino-Makefile/blob/master/arduino-mk-vars.md#cxxflags_std
I think it might be useful adding warning directly into the Makefile, next to the CXXFLAGS.... something like:
Values depend on the installed versions of your gcc/c++/avr-gcc and the code that is being compiled For details, see: https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md#cxxflags_std
Hi @romanchyla,
Thanks for reporting this issue :+1: You're right, I will add a warning about the flags regarding the -std=
option.
On Ubuntu, gcc
and avr-gcc
are independent. And your version avr-gcc 4.5.3
is rather old. To use avr-gcc 4.8.x
you must run the following:
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install gcc-avr binutils avr-libc avrdude
And you should have the following:
oups, you are right! i've started on ubuntu 11 and did the upgrade, but I haven't verified that i was on 14.04 (and I wasn't! silly old me...). i can confirm that it now works with the gnu11 options, well at least I learnt somehting extra about C standards :)
Hi, Thank you for putting the sample project together, I'd like to report a problem on Ubuntu 14.04 LTS
are not recognized options, compilation failed.
I have updated my toolchain to gcc4.8 (and also g++, cpp) http://askubuntu.com/questions/271388/how-to-install-gcc-4-8
But the problem persists, do you think it is because of an old avr-gcc? Is there a way around it? (the build from source seems rather daunting)
I have solved 'my problem' by editing the flags in the Makefile.
It then compiles and uploads/works well. BUT I'm not sure what these flags do and if it is safe to ignore them - according to https://gcc.gnu.org/gcc-4.7/changes.html, the gnu++0x is equivalent of gnu++11 (so it should be safe), but I don't understand C and the gnu11.
Can you please shed some light on it?