Hi, I believe those that followed my previous questions knows that I'm using Dev C++ as my IDE and the default compiler that comes with it, TDM GCC 4.9.2. However, this does not support the later version of C++.
This person downloads Dev C++ without compiler and later installs a different version of compiler, and he successfully uses it. I followed the steps and tried to install MingW GCC 9.2.0, and Dev C++ does indeed show MingW GCC 9.2.0 as its compiler, but when I tried to use a function from later version of C++ (iota and shuffle), I got an error telling I'm required to add -std=C++11 flag, however mentioning it's currently experimental. Is the problem caused by Dev C++ not being able to support a later version of compiler, or is it me that did the installation wrongly?
So I was wondering if anyone tried to install a later version of compiler for Dev C++, and if yes, how? Thanks for taking your time!
GCC 9.2 should already have at least C++11 or C++14 on by default.
If it's still saying that C++11 features are "experimental", then it means your IDE isn't pointing at the correct location for your compiler; it's still trying to use your old compiler.
I added the flags and they can compile, but just wondering if I'm able to change the compiler instead of adding the flags, since as Ganado said, GCC 9.2 should have C++11 or even C++14 by default.
FurryGuy is correct, I don't see the point in trying to keep an outdated IDE on life support. Code Blocks makes pointing to a new compiler pretty easy to do.
Just switch to CodeBlocks, or Visual Studio Community, or even just command-line build batch scripts with the compiler of your choice (g++ -Wall main.cpp -o main)
Personally, I just bypass the IDE completely when making simple single-file utilities.
I like the source file feature of Dev C++, so I'm trying to keep Dev C++ instead of using other IDE's'. I did try Visual Studio and Code::Block though, for Visual Studio, it's giving me too much error, even from the code from the answers of my previous questions (I know it's good so the code is error-proof), while for Code::Block, I don't know why but when I tried to use the source file, there's no compiler and I can't choose a compiler for it to use as well, whereas for project, there's no such problem for the compiler.
MSVC is not slow in my experience, even on my 7 year old desktop.
I did mention it is a hog on HD space. That is not up for debate.
VS 2019 is much more responsive than VS 2017.
I have MSVC (2017 & 2019 community), C:B (20.03) and DevC++ (Orwell, 5.11) installed. DevC++ is the hardest to work with IMO. Anything later than C++11, forget it. Even its C++11 support is a bit lacking in areas.
If you plan on compiling 32-bit & 64-bit for your code MSVC is able to do that "out of the box." Just select Win32 and/or x64 as the target(s) and *POOF*.
I know I can jigger some settings with C:B to do it by adding more setting selections. DevC++ switches between the two. Neither are as easy to do as I can with MSVC.
Having to relearn the idiosyncrasies of a different IDE should be the least of your worries.
For that matter why stick with an IDE. Learn command-line compiling. Using make or batch files if you want to do multi-file projects.
An IDE can be useful, but it can also be a restraint that hobbles getting a program to work.
There will be "teething" problems as you learn how to beat into submission a new IDE. C:B has the advantage of being a lot more configurable than DevC++.
Plus having a much newer compiler under the hood will be quite an advantage.