Installing a later compiler for Dev C++

Apr 17, 2020 at 2:52pm
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++.

I saw on this link: https://sourceforge.net/p/orwelldevcpp/forums/general/thread/1e29f28c/

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!

Apr 17, 2020 at 2:58pm
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.
Last edited on Apr 17, 2020 at 2:58pm
Apr 17, 2020 at 3:00pm
I got an error telling I'm required to add -std=C++11 flag,

It doesn't seem to be your mistake.
Why don't you add -std=C++11 and try to compile.
Apr 17, 2020 at 3:03pm
What Ganado said. GCC 9 defaults to C++11 and/or later.
Apr 17, 2020 at 3:05pm
Hi Ganado,

So I should uninstall and try to install the whole thing again right?
Apr 17, 2020 at 3:06pm
Don't bother, just get another compiler/IDE that has active support.

Visual Studio has the community edition that is free, and really is feature rich. It does gobble up LOTS of HD space, though.

https://visualstudio.microsoft.com/downloads/

Code::Block is a free IDE that uses MinGW/GCC as a possibly bundled compiler. The creators make it easy to change/upgrade the installed compiler.

C:B can import DevC++ projects.

http://www.codeblocks.org/

I've tried in the past to update the DevC++ compiler, it is more hassle than it is worth.

I use both C:B and MSVC to make sure any code I write is as agnostic as possible.
Apr 17, 2020 at 3:07pm
Hi Learner2,

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.
Apr 17, 2020 at 3:10pm
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.
Last edited on Apr 17, 2020 at 3:12pm
Apr 17, 2020 at 3:12pm
Hi Furry Guy,

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.
Apr 17, 2020 at 3:14pm
VS is really fat and slow.
Apr 17, 2020 at 3:35pm
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.
Apr 17, 2020 at 4:20pm
Alright thanks everyone, I've decided I'll try exploring Code::Blocks more
Apr 18, 2020 at 1:14am
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.
Topic archived. No new replies allowed.