in settings->compiler->general settings how do i enable the -std=c11 flag. i see it for g++ for c++
It is a poor workman who blames his tools.
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
Tim S is probably the best person you can ask for help with Codeblocks - tell him what problems you are having
By the way I find it easier/better to set things like standard in the project settings, not necessarily in the global settings.
cooper1200: I am guessing you are using Code::Blocks version 17.12 and building using a Code::Blocks project.
Edit: If then above is not true tell me the Code::Blocks version and start using an C::B project. If you do not wish to use a C::B project it would be best for you to find another IDE; Code::Blocks works best when using a C::B project.
Projects -> Build Options
Check "Have gcc follow the 2011 ISO C language standard" [-std=c11]
If it is not listed tell me and I will look up the directions to add it.
Tim S.
Last edited by stahta01; 06-15-2019 at 09:50 PM.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
thanks......
i am using version 16.01 as i am in mint and that was the latest release for mint. I do indeed use a project build. I have looked at the build options and it says have g++ follow c++ 11iso c++language standard [-std=c++ 11]
thanks for your help
coop
Also, consider that you don't need to use and IDE. You can use a text editor (a fancy one like VSCode/Atom if you want) and e.g. CMake to define your build structure and work from the terminal. No hidden behavior then.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
thanks i shall try that