hello altogether,
my name is Wolfram Pagels, Berlin, Germany
my status is :retired but enthusiastic c++-fan;

I use Dev-C++ since 3 month ago; in the 70th I programmed in Fortran;
after a long break I enjoy to learn c++11;

e.g.: the day before yesterday I got the following message from Dev-C++:

* c++0x_warning.h
#error this file reqires compiler and library support for the \SOC++11 standards. 
 This support is currently experimental, and must be enabled with the 

  -std = c++11  or  -std = gnu++11 compiler options;


My second question to you: * h o w to enable (these) options at my installed and running actual mingw compiler as part of Dev-C++ IDE ?

Thank you in advance for your time,

yours sincerely

Recommended Answers

All 3 Replies

Well, the answer to your problem (but not to your question) is to change your IDE. Dev-C++ is far too old to support C++11. The MinGW GCC version that ships with Dev-C++ is version 3.4.2, which is really old. Decent support for C++11 starts roughly from 4.6.0, but since it is still experimental, the newer the better. Currently, you can get 4.7.1 version through TDM-GCC ports. I recommend switching to CodeBlocks, which you can download as an installer that includes TDM-GCC 4.7.1. That should allow you to have decent C++11 support.

As for setting compiler options, you typically have to navigate the "Build Configuration" or "Project Properties" or similar panels. Usually, you will find a place to put "custom compiler options" where you can place the exact command-line compiler option (like -std=c++11), that is, if you can't find a checkbox for the particular option you need.

Well, the answer to your problem (but not to your question) is to change your IDE. Dev-C++ is far too old to support C++11.

The compiler can be changed to point to a newer version of MinGW. The only issue is there's no direct support for new features in the editor or UI components for C++11 switches in the IDE's configuration. However, you can still use the advanced command line arguments in the configuration to set those switches.

In other words, you can use a C++11 compliant compiler with Dev-C++, it's just not as easy as point and click out of the box. I agree that a newer IDE should be used, but some people like Dev-C++ too much to dump it.

Anyone know if Code::Blocks with MinGW has the switches for c++11?

[edit] I just now downloaded and installed CB Version 11 with MinGW. The IDE does indeed have an option to enabout c++11

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.