Code::Blocks Forums

User forums => Help => Topic started by: MajorTom on May 16, 2020, 08:37:22 pm

Title: Fehlermeldung Compilieren "Hello World"
Post by: MajorTom on May 16, 2020, 08:37:22 pm
Hallo,
beim compilieren von  HELLO WORLD  kommt folgender Fehler:

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Wer kann mir weiterhelfen?
Title: Re: Fehlermeldung Compilieren "Hello World"
Post by: oBFusCATed on May 16, 2020, 08:48:16 pm
Use English please!

Obviously the compiler is telling you what is wrong :)
Title: Failure during compilation of original "Hello World" progam
Post by: MajorTom on May 17, 2020, 06:49:29 am
After first installation of codeblocks, the compiler brings up the following failure message when I compile the original Hello World progam:

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I have no idea what's wrong.
Title: Re: Failure during compilation of original "Hello World" progam
Post by: stahta01 on May 17, 2020, 07:10:21 am
After first installation of codeblocks, the compiler brings up the following failure message when I compile the original Hello World progam:

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I have no idea what's wrong.

Find where you entered the option '-std=c++20' remove it.
You might try replacing it with '-std=c++2a'.

Edit: Some places to look
Project -> Build Options
Tab: Compiler Settings
Sub-Tab: Compiler Flags or Sub-Tab: Other Compiler Options


Tim S.
Title: Re: Fehlermeldung Compilieren "Hello World"
Post by: MajorTom on May 17, 2020, 07:38:38 am
I solved the problem:

1. Uninstallation of code::blocks
2. Removal of directory c:/user/"username"/appdata/roaming/codeblocks
3. Installation of code::blocks

Works!
Title: Re: Fehlermeldung Compilieren "Hello World"
Post by: stahta01 on May 17, 2020, 09:37:42 pm
Please only set project compiler options in the future. Setting the general compiler options is a bad idea till you learn more!

Tim S.