0.6 — Installing an Integrated Development Environment (IDE)

An Integrated Development Environment (IDE) is a piece of software that contains all of the things you need to develop, compile, link, and debug your programs.

With a typical C++ IDE, you get a code editor that does line numbering and syntax highlighting. Many (but not all) IDEs include a C++ compiler and a linker, which the IDE will know how to interface with in order to convert your source code into an executable file. And when you need to debug your program, you can use the integrated debugger.

Furthermore, IDEs typically bundle a number of other helpful editing features, such as integrated help, name completion, auto-formatting, and sometimes a version control system. So while you could do all of these things separately, it’s much easier to install an IDE and have them all accessible from a single interface.

So let’s install one! The obvious next question is, “which one?”. Many IDEs are free (in price), and you can install multiple IDEs if you wish, so there’s no “wrong decision” to be made here. We’ll recommend a few of our favorites below.

If you have some other IDE in mind, that’s fine too. The concepts we show you in these tutorials should generally work for any decent modern IDE. However, various IDEs use different names, layouts, key mappings, etc… so you may have to do a bit of searching in your IDE to find the equivalent functionality.


To get the most value of this tutorial, we recommend installing an IDE that comes with a C++17 capable compiler. Most of the lessons and examples will work with C++14 and C++11. However, if you encounter a lesson that uses concepts from C++17 and you’re using an older language compiler, you’ll have to translate it to your version, which may or may not be easy.

We recommend installing the newest version of a compiler. If you can’t use the newest version, these are the absolute minimum compiler versions with C++17 support:

  • GCC/G++ 7
  • clang++ 8
  • Visual Studio 2017 15.7

Visual Studio (for Windows)

If you are developing on a Windows machine (as most of you are) and disk space and download size are not a constraint, then we strongly recommend Visual Studio Community. 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++. If you do not do this, then C++ capabilities will not be available.

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.

Visual Studio Workload

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

Code::Blocks (for Linux or Windows)

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.

For Windows users

Make sure to get the version of Code::Blocks that has MinGW bundled (it should be the one whose filename ends in mingw-setup.exe). This will install MinGW, which includes a Windows port of the GCC C++ compiler:

Code::Blocks MinGW Windows download

For Linux users

Some Linux installations may be missing dependencies needed to run or compile programs with Code::Blocks.

Debian-based Linux users (such as those on Mint or Ubuntu) may need to install the build-essential package. To do so from the terminal command line, type: sudo apt-get install build-essential.

Arch Linux users may need to install the base-devel package.

Users on other Linux variants will need to determine what their equivalent package manager and packages are.

When you launch Code::Blocks for the first time, you may get a Compilers auto-detection dialog. If you do, make sure GNU GCC Compiler is set as the default compiler and then select the OK button.

Compilers Auto Detection dialog

Q: What do I do if I get a "Can't find compiler executable in your configured search paths for GNU GCC Compiler" error?

Try the following:

  1. If 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 going to settings, compiler, and choose “reset to defaults”.
  3. Try going to settings, compiler, toolchain executables tab, and make sure “Compiler’s installation directory” is set to the MinGW directory (e.g. C:\Program Files (x86)\CodeBlocks\MinGW).
  4. Try doing a full uninstall, then reinstall.
  5. Try a different compiler.


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, as of Aug 2018 it does not support C++, so at this time we can not recommend it.

Other compilers or platforms

Q: 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.

Q: Can I use a command-line compiler (e.g. g++ on Linux)?

Yes, but we don’t recommend it for beginners. You’ll need to find your own editor and look up how to use it elsewhere. Using a command line debugger is not as easy as an integrated debugger, and will make debugging your programs more difficult.

Q: Can I use other code editors or IDEs, such as Eclipse, Sublime, Notepad++, or Visual Studio Code?

Yes, but we don’t recommend it for beginners. There are many great code editors and IDEs that can be configured to support a wide variety of languages, and allow you to mix and match plugins to customize your experience however you like. However, many of these editors and IDEs require additional configuration to compile C++ programs, and there’s a lot that can go wrong during that process. For beginners, we recommend something that works out of the box, so you can spend more time learning to code and less time trying to figure out why your code editor isn’t working properly with your compiler or debugger.

IDEs to avoid

We recommend avoiding the following IDEs because they are no longer actively supported or maintained:

  • Borland Turbo C++
  • Dev C++

If possible, use an IDE that receives regular updates and bug fixes, and that will be updated to incorporate new language features over time.

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

IDE installations seem to cause their 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, try uninstalling 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 can be one of the hardest steps if things don’t go as expected), or if you’re temporarily proceeding with a web-based compiler, you are ready to write your first program!

0.7 -- Compiling your first program
0.5 -- Introduction to the compiler, linker, and libraries

584 comments to 0.6 — Installing an Integrated Development Environment (IDE)

  • Jay

    The options look different for me in VS... Any idea what to do?

  • Hana Murata

    Can I use Visual Studio Community 2019?

  • Newbie

    Can I use my smartphone to download IDE? I want to learn everywhere. Hoping everyone will help.

  • Dan S.

    The Visual Studio 2019 Release Candidate (RC) is currently available via Microsoft's website.  Full release is scheduled for 2 April.

  • Jerry

    Can I use QT Creator?

    • Alex

      Sure, you'll just have to figure out how to access the relevant functions (e.g. to create a new project, compile a program, etc...) within the IDE yourself.

  • Phil

    "IDE installation seems to cause its fair share of problems."

    should be:

    "IDE installations seem to cause their fair share of problems."

    Also, every instance of IDE's should be IDEs. None of them are possessive and therefore should not have apostrophes. I don't know why so many people use apostrophes for plural acronyms...

  • Serena

    Update: Eclipse may have one with C++ for Mac

    "An IDE for C/C++ developers with Mylyn integration."

  • Oliver

    Any good IDE suggestions that are downloadable on chromebooks?

  • Kushal

    I have Visual studio 2012 , hope it does solve the purpose of learning and development ?

    • Hi Kushal!

      According to this ( ) list, VS2012 doesn't support many of C++'s features added in the last 8 years. The article was published in 2017, so something might have changed since then, but I'm doubtful about that.
      I suggest you to update to a later IDE, not necessarily VS.

      • Kushal

        Thankyou for the suggestion, will do. I think I will start with this one and will change IDE when there is a roadblock.

        Kind Regards

  • Ian Rocker

    I just downloaded MS Visual Studio 2017 to learn these tutorials with. Should I select the "General" layout upon startup, or "Visual C++"? Thanks!

    • Alex

      Where are these layout options coming from? I don't see them in my Visual Studio 2017. In any case, layouts can be switched as you please, so you could try both and see which one you like better.

  • pakraaw

    Hey Alex,

    I wrote up a small how-to on using Sublime as an IDE-substitute for C++ (for 'nix systems), specifically setting it up to overcome the challenge of using linked header files (as mentioned here

    All that's needed is cmake, make, and a predictable folder structure-- one folder per project with the header files in a /includes sub-folder.

    I'd imagine this to be sufficient for most problems encountered for the first half dozen chapter of this tutorial? Let me what you think about the work-around, or if you think this can be helpful to beginners. My main motivation was to escape the pain of setting up IDEs.


    You can use the above script by creating saving it as a shell command, and then creating a new build system in Sublime using the following code

  • Ajalle Perfej

    For Windows users, if you want to use CLI then you can still do so with Ms Visual Studio Build Tools. It's a smaller download than Visual Studio Community and takes less time to install. The basic compiler command is


    Should that be added to the lesson?

  • Dennis

    What IDE do I use for Arduino development?  I have the version downloaded from Arduino, but is it compatible with this tutorial?

    • Alex

      It looks like there's an Arduino extension for Visual Studio:

      I'd probably start there, as I've heard the Arduino IDE is pretty bad.

      • Bill

        "... Arduino extension for Visual Studio ... Arduino IDE is pretty bad"
        Yes and yes and no and no.
        VS is *dose only.
        The Arduino IDE is OK for beginners ... any other IDE would be waaaay too complex and thus overwhelming for the beginner.

        If cross platform is needed, there is an Arduino version of Code::Blocks.

        I use Code::Blocks to write the code and the Arduino IDE to compile and upload.
        Naturally, one needs to know what one is doing for Code::Blocks is just a glorified wordprocessor in this case.

        In summary:
        If you are a confident programmer just new to C++: use the IDE you like. But you would know that ...
        If you are a beginner programmer, start with the most simple IDE you can find. If you want to use Arduino, use the Arduino IDE. For your wellbeing, DON'T start with VS! You don't yet know the terminology, thus will not understand 99.9% of it's abilities, setup etc. and it will drive you mad. (Similar with Code::Blocks too) You want to learn programming and C++ not fighting an IDE!
        Have fun!

  • Bob Ross

    Are there any IDE's or recommended websites for Lenovo Chromebook (or just google based)?

  • David

    HI, I own a Lenovo PC that is running Windows 10 S. That means it is running in Safe Mode and is the recommended mode for security. I would ideally like to keep it that way, but in "S mode" it won't let me download anything like a compiler, let alone and IDE. I know there is the option to switch out of the S mode, but is there any way around this while still keeping the PC secure?

    • Alex

      I couldn't say. You could use a web compiler temporarily (at least long enough to see if you like the lessons and want to stick with them) before making a call.

  • 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

      • Haguen

        As another solution for the xterm issue, you can do this in case you're using Linux Mint Mate:

        1 - click on Settings->Environment...
        2 - Select General Settings on left panel ( I guess it's selected by default, it is the first icon in the panel)
        3 - locate the last option 'Terminal to launch console programs: xterm -T $TITLE -e'
        4 - change it to : mate-terminal -t $TITLE -x

        The difference of the last parameter is that for mate-terminal the '-e' option won't ask you to press ENTER when running the project from CodeBlocks causing the terminal window to blink preventing you to check the output.
        The option to print the title is in lowercase for mate-terminal.

        Alex, it could be a good idea to inform this option in your lesson.

        Cheers !

  • 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]