News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Fehlermeldung Compilieren "Hello World"

Started by MajorTom, May 16, 2020, 08:37:22 PM

Previous topic - Next topic

MajorTom

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?

oBFusCATed

Use English please!

Obviously the compiler is telling you what is wrong :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MajorTom

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.

stahta01

Quote from: 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.

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MajorTom

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!

stahta01

Please only set project compiler options in the future. Setting the general compiler options is a bad idea till you learn more!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]