Author Topic: Fehlermeldung Compilieren "Hello World"  (Read 3409 times)

Offline MajorTom

  • Single posting newcomer
  • *
  • Posts: 3
Fehlermeldung Compilieren "Hello World"
« 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?
« Last Edit: May 16, 2020, 08:39:10 pm by MajorTom »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Fehlermeldung Compilieren "Hello World"
« Reply #1 on: May 16, 2020, 08:48:16 pm »
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!]

Offline MajorTom

  • Single posting newcomer
  • *
  • Posts: 3
Failure during compilation of original "Hello World" progam
« Reply #2 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Failure during compilation of original "Hello World" progam
« Reply #3 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.
« Last Edit: May 17, 2020, 07:30:18 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MajorTom

  • Single posting newcomer
  • *
  • Posts: 3
Re: Fehlermeldung Compilieren "Hello World"
« Reply #4 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!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Fehlermeldung Compilieren "Hello World"
« Reply #5 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org