I am currently using Atmel Studio 7 and I need to enable c++11 support for it. I couldn't find any documentation about this topic. Moreover, I am not even sure it has c++11 support, yet.
Asked
Active
Viewed 5,907 times
9
-
2Have never tried it but does it work if you go into the AVR/GNU C Compiler / Miscellaneous options for the project and change `-std=gnu99` to `-std=gnu++11`? – PeterJ Oct 24 '15 at 10:31
-
1An alternative I am using is setting the compiler flag `-std=c++11`. You can write this or PeterJs solution in the "Other flags field of Miscelleaneous of AVR/GNU C++ Compiler. – Grebu Oct 24 '15 at 13:32
1 Answers
9
I just started a new C++ project under Atmel Studio 7 and with the default options the following code failed with a nullptr
not declared error:
char *c;
if (c == nullptr)
;
Then I went into the Toolchain options under the project properties and added the -std=c++11
flag as suggested by Grebu under the "other flags" which seemed like the best place for it and it compiled fine:

PeterJ
- 17,131
- 37
- 56
- 91