-->Dev-C++ is a free IDE for Windows that uses either MinGW or TDM-GCC as underlying compiler.
Originally released by Bloodshed Software, but abandoned in 2006, it has recently been forked by Orwell, including a choice of more recent compilers. It can be downloaded from:
Here, select the 'Settings' tab, and within it, the 'Code Generation' tab. There, in 'Language standard (-std)' select 'ISO C++ 11':
Ok that. You are now ready to compile C++11!
As an example, try:
There, write the following:
Then:
And save it with some file name with a
Now, hitting
If you get an error on the type of
cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio for Windows.
Nov 10, 2016 DEV-C supports GCC-based compilers, popular for its stability and the variety of languages they support. The compiler systems used in this IDE make it quite flexible. It utilizes the MinGW (Minimalist Graphics User Interface) for Windows, which uses GCC, as well as Cygwin, as an alternative option. Cpp c compiler flags command line options. CPP/C Compiler Flags and Options. Table of Contents. Compiler flags and invocation. Better for debugging builds during development, since it provides faster compile-time. (-O1) - Optimization Level 1. C and C Compiler - Can compile both C and C code depending on the flag.
Note
You can start this tool only from a Visual Studio developer command prompt. You cannot start it from a system command prompt or from File Explorer. For more information, see Use the MSVC toolset from the command line.
The compilers produce Common Object File Format (COFF) object (.obj) files. The linker produces executable (.exe) files or dynamic-link libraries (DLLs).
Note that all compiler options are case sensitive. You may use either a forward slash (
/
) or a dash (-
) to specify a compiler option.To compile without linking, use the /c option.
Dev C++ Compiler Online
Find a compiler option
To find a particular compiler option, see one of the following lists:
Specify compiler options
The topic for each compiler option discusses how it can be set in the development environment. For information on specifying options outside the development environment, see:
Related build tools
Dev C++ Compiler Options
MSVC Linker Options also affect how your program is built.
See also
C/C++ Building Reference
CL Invokes the Linker
CL Invokes the Linker
Originally released by Bloodshed Software, but abandoned in 2006, it has recently been forked by Orwell, including a choice of more recent compilers. It can be downloaded from:
http://orwelldevcpp.blogspot.com
Installation
Run the downloaded executable file, and follow its instructions. The default options are fine.Support for C++11
By default, support for the most recent version of C++ is not enabled. It shall be explicitly enabled by going to:Tools -> Compiler Options
Here, select the 'Settings' tab, and within it, the 'Code Generation' tab. There, in 'Language standard (-std)' select 'ISO C++ 11':
Ok that. You are now ready to compile C++11!
Compiling console applications
To compile and run simple console applications such as those used as examples in these tutorials it is enough with opening the file with Dev-C++ and hitF11
.As an example, try:
File -> New -> Source File
(or Ctrl+N
)There, write the following:
Then:
File -> Save As...
(or Ctrl+Alt+S
)And save it with some file name with a
.cpp
extension, such as example.cpp
.Now, hitting
F11
should compile and run the program.If you get an error on the type of
x
, the compiler does not understand the new meaning given to auto
since C++11. Please, make sure you downloaded the latest version as linked above, and that you enabled the compiler options to compile C++11 as described above.