Which IDE in order to install and use a compiler with C++14 constexpr relaxation?

354 views Asked by At

I apologize if this question is out of topic, but it's a matter of accessibility for C++14 programmers.

Today i've updated Qt v5.4 on my PC (Windows 8.1/64bit/x86) and it support now the gcc compiler v4.9.2. But i've seen that constexpr relaxation (which really interest me) is available since gcc v5.1.

A search on google shows that :

  • clang is the better compiler for C++14 latest features (v3.6 is even dealing with experimental C++17)
  • clang is not easily suitable with Qt libraries
  • both gcc and clang "datas" are downloadable but i'm not an expert...

So i'm asking how to get a free IDE on Windows 8.1 with an adequate compiler.

If i dismiss Qt for my C++14 experiments, is Codeblocks a better solution ?

Does any else IDE already include an adequate compiler during the installation ?

Where can i find help to install such a compiler ?

1

There are 1 answers

0
Spacemoose On

Your question is poorly phrased -- for the most part, ide's and compilers are decoupled -- the exception that comes to mind is visual studio, which is an ide that is tightly coupled to microsoft's compiler.

Whether you chose codeblocks, or eclipse, or use a simple text editor, you should be able to choose your compiler fairly easily, and independently of your ide. So you have two independent questions: Where can you get a free compiler for windows with high standards compliance, and what's a good IDE with which to use that compiler.

I'm not a windows person, but very simple, one-file projects, you might actually find it easy to use a gnu-linux environment, which you can do under windows by using cygwin:

http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/

This may seem daunting at first, but let me tell you the benefits:

  1. you'll learn the difference between your compiler and editor.
  2. As long as you are only experimenting with the standard, you may find it simpler to get set up than using an ide.
  3. You'll have to learn about the c++ compile process (compiling, linking, possibly preprocessing), not about ide specific stuff.

This will prevent you from conflating ide-specific stuff with c++ stuff, as you have done in your question. As you begin working with projects you'll probably find an ide an advantage, but in the beginning staying close to the raw tools may give you the fastest learning return on investment.

After install cygwin, all you have to do is write your code (using a syntax highlighting editor like gedit or emacs is suggested), and then run

g++ -std=c++14 filename.cpp

to compile your code.

You should be able to use clang under cygwin as well.