0.5 — Installing an Integrated Development Environment (IDE)

As mentioned in the previous section, an Integrated Development Environment (IDE) contains all of the things you need to develop, compile, link, and debug your programs. So let’s install one.

The obvious question is, “which one?”. Keep in mind that you can install multiple IDEs, so there is no “wrong decision” here. During the course of these tutorials, we will be showing you some of the nice features of your IDE, such as how to do integrated debugging. All of our examples will be done using both Microsoft’s Visual C++ (for Windows), and Code::Blocks (for Linux or Windows). Thus we highly recommend you pick one of these.

However, if you would like to try a different IDE, you are free to do so. The concepts we show you will work for any IDE -- however, different IDE’s use different keymappings and different setups, and you may have to do a bit of searching to find the equivalent of what we show you.

Windows IDEs

If you are developing on a Windows machine (as most of you are), then you have two choices:

1) If disk space and/or download size are not a constraint, then we recommend Visual Studio Community 2017. When you run the installer, you’ll eventually come to a screen that asks you what workload you’d like to install. Choose “Desktop development with C++”.

The default options selected on the right side of the screen should be fine, but please ensure that the Windows 10 SDK is selected. The Windows 10 SDK can be used on older versions of Windows, so don’t worry if you’re still running Windows 7 or 8.

This will take about 6.3 gigs of drive space.

2) If disk space and/or download size are a challenge, then we recommend Microsoft’s free Visual Studio Express 2015 for Windows Desktop, which you can find towards the bottom of the page.

The installer that you download off of Microsoft’s web page is actually a downloader. When you run it, it will download the actual IDE from Microsoft and install it.

Note: This tutorial was originally written when Microsoft was distributing the 2005 version of Visual C++. Consequently, some references and screenshots are targeted to that version. Running any later versions (such as 2013, 2015, 2017, etc…) are fine, however, your screens may look slightly different.

Linux or Windows IDEs

If you are developing on Linux (or you are developing on Windows but want to write programs that you can easily port to Linux), we recommend Code::Blocks. Code::Blocks is a free, open source, cross-platform IDE that will run on both Linux and Windows.

Windows users: make sure to get the version with MinGW bundled.

With Code::Blocks, C++11/C++14 functionality may be disabled by default. You’ll definitely want to check and turn it on. First, go to Settings->Compiler:

Then check the box marked “Have g++ follow the C++11 ISO C++ language standard [-std=c++11]:

Note: If “Have g++ follow the C++14 ISO C++ language standard [-std=c++14]” exists for your version of Code::Blocks, use that instead.

After installing Code::Blocks, some users have been getting an error message “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”. If you run into this, try the following:

  1. In you’re on Windows, make sure you’ve downloaded the version of Code::Blocks WITH MinGW. It’s the one with “mingw” in the name.
  2. Try doing a full uninstall, then reinstall.
  3. Try going to settings, compiler, and choose “reset to defaults”.
  4. Try a different compiler.

Alternately, some people prefer to use Bloodshed’s Dev-C++, which also runs on both Windows and Linux.


Popular Mac choices include Xcode (if it is available to you), or Eclipse. Eclipse is not set up to use C++ by default, and you will need to install the optional C++ components.

Although Visual Studio for Mac has been released, it currently does not support C++, so at this time we can not recommend it.

Can I use a web-based compiler?

Yes, for some things. While your IDE is downloading (or if you’re not sure you want to commit to installing one yet), you can continue this tutorial using a web-based compiler, such as the one at TutorialsPoint.

Web-based compilers are fine for dabbling and simple exercises. However, they are generally quite limited in functionality -- many won’t allow you to save projects, create executables, or effectively debug your programs. You’ll want to migrate to a full IDE when you can.

When things go wrong (aka. when IDE stands for “I don’t even…”)

IDE installation seems to cause its fair share of problems. Installation might fail outright (or installation might work but the IDE will have problems when you try to use it due to a configuration issue). If you encounter such issues, here’s what to do next:
1) Check lesson 0.7 -- A few common C++ problems to see if there’s already a fix or workaround there.
2) Uninstall the IDE (if it installed in the first place), reboot your machine, disable your antivirus or anti-malware temporarily, and try the installation again.

If you’re still encountering issues at this point, you have two options. The easier option is to try a different IDE. The other option is to fix the problem. Unfortunately, the causes of installation and configuration errors are varied and specific to the IDE software itself, and we’re unable to effectively advise on how to resolve such issues. In this case, we recommend copying the error message or problem you are having into a Google search and trying to find a forum post elsewhere from some poor soul who has inevitably encountered the same issue. Often there will be suggestions on things you can try to remedy the issue.

Moving on

Once your IDE is installed (which is one of the hardest things this tutorial will ask you to do), or if you’re temporarily proceeding with a web-based compiler, you are ready to write your first program!

0.6 -- Compiling your first program
0.4 -- Introduction to development

458 comments to 0.5 — Installing an Integrated Development Environment (IDE)

  • Christian

    Hello and thank you for these tutorials. Which IDE should I download if I am using Ubuntu on a Windows machine? Still the ones suggested for Windows or those for Ubuntu?

  • P-z

    Hello, I'm using Linux Mint 18.3 with the kernel 4.10.0-38 and I encountered this problem with Code::Blocks.

    When I tried to compile a simple "Hello World" program with g++, it exited with error code 127.  This was because g++ was never installed.  After I installed it it compiled fine, but it wasn't running. I tried running the command shown in the build log manually and it said xterm wasn't installed either.
    After I installed both of those, everything worked fine.

    If anybody else encounters these errors, just use this command to download both of them from your repository:

    ~ P-z

  • Manish

    I am getting the below error. Please help

    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(273,5): error MSB6006: "CL.exe" exited with code -1073741515.

  • Mixhail

    use xcode for macs

  • 丞煒

    Is this free? download and use?
    Though it's hard for me to read English,
    hope it will help me.
    Thank you!

  • Jacob

    There is a version of Visual Studio for Macs. You can find it via this link:

    • Alex

      Good call out. I've integrated that information into the lesson. Thanks!

      • Nic

        Hi Alex, I downloaded Visual Studio for Mac and I believe the consensus is that it does not support C++

        Bummer : /

  • Joe

    Trying to download code::blocks

    getting “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”

    searched around for the file you said it should have in dos, but I find mingwm10.  is this comparable?

    • Joe


      possible solution for code::blocks

  • Mark

    There are only minor syntax changes for c++ 11 iso c++ language standard and c++14 iso c++ language standard right?

    • nascardriver

      Hi Mark!

      Quoting Wikipedia:
      1    New language features
      1.1    Function return type deduction
      1.2    Alternate type deduction on declaration[5]
      1.3    Relaxed constexpr restrictions
      1.4    Variable templates
      1.5    Aggregate member initialization
      1.6    Binary literals
      1.7    Digit separators
      1.8    Generic lambdas
      1.9    Lambda capture expressions
      1.10    The attribute [[deprecated]]
      2    New standard library features
      2.1    Shared mutexes and locking
      2.2    Heterogeneous lookup in associative containers
      2.3    Standard user-defined literals
      2.4    Tuple addressing via type
      2.5    Smaller library features


      Try getting a compiler that supports C++17.

  • Brian

    I am downloading on a windows 10 but I am running the IDE on a windows xp which IDE should I get.

  • Aditya prasad

    I have turbo c++ not Microsoft's visual c++ , so would that make any difference or would i have to download the latter .

    • nascardriver

      Hi Aditya!

      Turbo C++ is discontinued so it might lack new language features, I suggest you to get an up-to-date compiler.
      There's no need for msvc++, you can use any compiler you want.

  • Munachi

    Is there anyone for ios??

  • Munachi

    Lol i dont even know what my mates are doing here

    I love programming i have tried to understand it but no way ;(

  • Roland

    Is visual studio 2017 community free or a trial version? I got a notification saying that the trial license will expire, was wondering if anyone could let me know what it means?

  • Aleks

    Thank you!

  • Aleks

    #include <iostream>
    #include <cmath>
    #include <iomanip>

    using namespace std;

    int main()
    long double i = 0, sum = 0;
    for(;i <= 63; i ++){
    cout « "..." « i « "..." « setprecision(21)« pow(2,i) « endl;
    sum = sum + pow(2,i);
    cout « "........" « setprecision(21) « sum « endl;

    return 0;

    1. Display in ((sizeof(long double) == 16bytes)) 18446744073709551615 (true);
    2. Display in VS2017 ((sizeof(long double) == 8bytes)) 18446744073709551616(false);

    Why did I get such results when compiling?

    • nascardriver

      Hi Aleks!

      This has to do with the binary representation of a double. You'll get the same range but less precision.

      Please use code tags next time.

Leave a Comment

Put all code inside code tags: [code]your code here[/code]