User forums > Help

Error after Installation of Code::Blocks 20.03

(1/1)

GShauffenburg:
Hello group,

I am new to Code::Blocks and have uninstalled and the reinstalled the latest release (20.03) several times, with a reboot each time, but cannot resolve my issue.  I am working through the examples for C++ ALL-IN-ONE for dummies and am getting the following message after installing the latest release:
=== Build: Debug in VariadicTemplate (compiler: GNU GCC Compiler) ===
error: unrecognized command line option '-std=gnu++20'; did you mean '-std=gnu++2a'?
=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===

Did I miss something when I performed the install or is there something else that I need to install in addition to Code::Blocks?  I have checked and there is no option for a C++20 compiler and the complier selected is C++17 GNU C++ language standard (ISO C++ plus GNU extensions).   So I am not sure where the gnu++ 20 is even coming from.

Any help or suggestions in how to diagnose and resolve this issue would be greatly appreciated.

Regards,

Graham

BlueHazzard:
For compilation errors please always follow this guide:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

The installed compiler does not support this option. Places where this option can be set:


* Project->Build options->Select the project name on the left->Compiler flags
* Project->Build options->Select the project name on the left->Other compiler options
* Project->Build options->Select your build target on the left->Compiler flags
* Project->Build options->Select your build target on the left->Other compiler options
* Settings->Compiler->Global compiler settings->compiler settings->Compiler flags
* Settings->Compiler->Global compiler settings->compiler settings->Other compiler options

gd_on:
If you installed C::B 20.03 with the official installer, you have certainly also installed gcc 8.1. This version of compiler was built in 2018. As far as I remember, c++20 or gnu++20 was not still available, but you should have gnu++2a effectively, which should work for you. If you really need gnu++20, you should update the compiler with a more recent version, for example the one provided with Msys2. Have a look in the codeblocks manual where you can eventually find other informations.

GShauffenburg:
Thank you for the help.

Somehow there was a setting added to the Other Compiler Options tab that was causing my issue.

Everything is working again.

Navigation

[0] Message Index

Go to full version