I have installed Code::Blocks for Windows and want to compile C++14 code like generic lambdas but the binary version of Code::Blocks that I've installed from codeblocks.org doesn't support the flag -std=c++14
.
How do I update the compiler and enable -std=c++14
flag for Code::Blocks?
May a humble newbie make one small suggestion? A small modification to test C++14 code, to allow resulting .exe file to be run independently of the IDE it was created in, slightly modified test program follows:
Thank you all, peace to all fellow coders, especially Igor Tandetnik.
To compile your source code using C++14 in Code::Blocks, you, first of all, need to download and install a compiler that supports C++14 features.
Here’s how you can do it on Windows:
Now, try to compile a program with C++14 features: