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.


Since Visual Studio for Mac is now available, we suggest you use that.

Other 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.

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

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

  • Josh

    Would C++ in the Unreal Engine be okay?

  • Aleks


    In VS Studio 2017 : "Debug" > "Options" > "Debugging" > "Symbols"      and "tick" the  
        "Microsoft Symbol Server".

  • Ran

    Although it does not affect the programming experience, I just not completely confortable with the following output message everytime I press F5 in my VS Studio 2017. Does any body know what's going on here?

    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Users\user\source\repos\ConsoleApplication4\Debug\ConsoleApplication4.exe'. Symbols loaded.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cmd.exe'. Cannot find or open the PDB file.
    'ConsoleApplication4.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\cmd.exe'
    The program '[11696] ConsoleApplication4.exe' has exited with code 0 (0x0).

    • Alex

      This is the debugger telling you that it's unable to load debug files for various Windows DLLs. Since Windows doesn't ship with these files, it's just letting you know it can't find them. Consequently, if in the process of debugging, you step into a function that is contained in one of those Windows DLLs, the rich debugging information that is normally available won't be available.

      You shouldn't see these if you switch your build target to "release".

    • Aleks

      In VS Studio 2017 : "Debug" > "Options" > "Debugging" > "Symbols"      and "tick" the  
          "Microsoft Symbol Server".

  • James Johnson

    I suggest if you do not have a super fast Internet connection, start the download at night and go to bed. That's one big download!:)

  • Cruel World

    It's been two hours and my installation of Visual Studio is just 33%. How long it'll take more? And I really don't know weather this installation is going in right way or not.. :-/

    • nascardriver

      Hi Cruel World!

      Visual Studio is huge, you'll only need a fraction of the features it offers. Sadly MS doesn't offer a minimal version of it.
      You can already start with the first few lessons. If you make it to the coding lessons in time you can use an online compiler (eg. ) while waiting for your installation to finish.

  • Jeeba

    For Codeblocks if you get error in the right bottom corner.
    You will need to install compiler first.

    If you have installed Codeblocks already and after that install TDM-GCC then you can launch Codeblocks from Codeblocks launcher and there you can set GNU GCC compiler as default.

    It is missing from this quide, but was quite easy to find out.

    Hope it helps for people that have problems. 🙂

  • Saket Kumar

    dear sir downloading IDE for windows will take 6 gb for downloading or installing??

  • Ethan

    When I close codeblocks it says the perspective:code blocks default has changed. Do I save that? what does it do? I didn't the first time and it tells me every time I close the application. When I open it back up the follow the C++14 ISO C++ language standard [-std=c++14] is still checked.

  • ZPeU

    Help! Whenever i try to install Visual Studio 2015, it says I need a newer version of Windows. However, i have Windows 7 Ultimate. Any idea of what's happening? Oh, and by the way, my computer says my Windows version is not genuine (even though I payed for installation). Could that be the problem?

  • Sndn

    Why do we need Windows 10 SDK, profiling tools, tools for CMake and ATL support? Could you please explain why these are needed?

    • Alex

      It's unclear to me what the relationship between the Windows SDK and win32 applications is. My initial take is that the windows SDK is required to create Win32 applications. Maybe someone else with more knowledge of Windows can respond.

  • Jerome

    Is installing an IDE really one of the hardest things we'll do ?

  • Anjali

    Hello sir,
    In my college, they are using Turbo C++ and I just downloaded it. I think the only difference between these 2 is in turbo c++ the starting is:
    #include<iostream .h>
    #include <conio.h>

    And it ends with
    getch  ();
    I'm I right? Or is there anything more i wanna care??

    • Alex

      Turbo C++ is outdated and conio.h is not standard C++. As such, I can't advise on it here.

    • Turbo C++ was released in 1990, 8 years before the first C++ language standard was established.  Turbo C++ does not implement namespaces, templates and several other features that were mandated by the first standard.  Additionally, it can only compile 16 bit programs, which won't run on ANY Windows version after Windows 2000 without an emulator program.  It's use is strongly discouraged even in educational arenas, and the fact that your college is using it does not reflect well on the level of education you are receiving.  There are many other options that they could be using which are also free to use. (gnu, mingw, Visual Studio...etc.).  The ONLY possible rationale I can see for using Turbo C++ is if your college's computers are so archaic that they are 16 bit processors running DOS.

  • AMG

    Hi Alex,
    Could you please provide your custom settings for IDE? Like your text editor colors and font. Thanks a lot.

    • Alex

      If you're talking about my actual IDE (Visual Studio), I use the default. If you're talking about the syntax highlighter on this site, that's done via a WordPress plugin called Crayon. You'd have to download Crayon and tear apart the source code to see what colors and fonts it's using.

  • Travis

    Thanks for writing this.  I hope you wrote all the tutorials, because it's an easy read and very helpful.  Actually laughed out loud on some points.  I look forward to spending more time on this site.  Thanks!

  • Deku

    Hi, i have VS 2015 i registered and now i have some updates:
    -Microsoft Azure SDK 2.9.6
    -MIcrosoft SQL Data Tools (SSDT) Update
    -Microsoft ASP.NET and Web Tools

    If i update all of that is my VS going to be 2017 version ? Or should I uninstal Vs2015 and than download 2017 ?

  • Ashmin

    is it okay it shows me that it is only 5.32gb.....and should i install enterprise or community or professional???

    • Alex

      I can't speak to the size requirement -- I'd assume it's fine. You should install the community version unless you have a compelling reason to do otherwise.

  • Kbear

    Hey C++ teacher!!
    So i'm trying to download and install Visual Studio Community 2017 from your link but after i open the download and accept the terms and conditions, the progress bar shows up and once it reaches 100% it gives me this error "The specified service does not exist as an installed service.(Exception from HRESULT: 0x80070424)" i have no idea how to fix this.
    i have googled answers but nothing that helps.
    space is not an issue
    if you can help that would be amazing.

  • Hema

    you can suggest this- This is an online compiler and IDE. It is very convient for beginners.

  • Kwaku

    Hello Alex I am trying to create my first C++ project but i need a cross compiler's prefix and path. could you help please

  • Not telling you my name/email

    hi, ive just started, if i get any probs with Code::Blocks i'll reply here k?

    Also, this is the second programming language im going to learn (original: Python)

    THX XD!

  • Mister teacher,

    I have a question:

    I have downloaded Visual Studio Community 2017 and now after 30 days it asks me to Register and pay.

    Do you know if I did something wrong?


  • My dear c++ Teacher,

    Please let me one more question about Code::Blocks.
    In "Console application" window, does "Resulting filename" mean "Resulting file path"?

    With regards and friendship.

  • My dear c++ Teacher,

    Please let me following question.
    Recently I downloaded Code::Blocks 16.01.
    In compiler settings > Global compiler settings, after
    “Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" there is
    "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]".
    Do you suggest it instead?

    With regards and friendship.

  • Seif El-deen

    hey alex

    i have a windows 10 laptop which IDE program would be suitable for me

    • Alex

      I recommend Visual Studio Community for anybody who can run it. I'm running Visual Studio Community on my Win10 laptop.

      • seif eldeen

        wow i didn’t think that you would reply but well i think that after i finish the c++ tutorial i will be able to do everything and i must encounter some problems in my learning journey so i think that i know where i am supposed to be asking for help

  • Aritra Das

    I download vc_redist.x86.exe(size-13mb).then i installed it but after installing i could not find what to do.I did not find the logo of microsoft visual c++  ..pls helpp...after this thing what should i download ..plz sent me the link

    • Alex

      You downloaded the wrong file. I have no idea where you found this file. The links in the lesson above contain links to the pages that contain the proper downloads (either Community 2017 or Express 2015 for Windows Desktop)

  • Khoi Nguyen

    Hello my teacher,
    I have just downloaded codeblocks and i got  the following error message "can't find compiler executable in your search path(GNU GCC compiler)". Could you please help me with this?
    Thanks a lot!

    • Alex

      This is a common enough question that I've updated the lesson with some suggestions. Please have a read and let me know if any of these were able to resolve your issue.

  • Zach

    Hi Alex,

    Thanks for the excellent tutorials. As a complete new programmer, I hate to sound ignorant or knit picky, but I think it would be very helpful in this section 0.5 to make a note that Windows SDK 8.1 and Windows SDK 10s do not install automatically in VS Community 2017 with the Desktop Development with C++ selection, but they appear to be necessary for the following section. I ran into an error with my attempting to program "HelloWorld!" in the next section despite proper entry. The Solution would be to ensure on the individual components tab that Windows 8.1 SDK and all Windows 10 SDKs get installed along with Desktop Development with C++ from the get go. If Desktop Development with C++ installs without the SDKs, I found you can press the modify button when VS opens and select the SDKs for an update. I only mention the suggestion because I really appreciate the site and all you do, and I noticed some other new folks in 2017 were having an issue as well! From a completely new programmer perspective, I think it would be helpful to avoid an error in the next section! By the way, I am a Windows 7 user, and I apologize if this isn't relevant for Windows 8 and 10. Thanks, and I hope this helps your site and isn't a complete waste of space.

    • Alex

      You shouldn't need the Windows 8.1 SDK, and the Windows 10 SDK installs by default.

      The screenshot in the lesson is the one the appears by default once you select "Desktop development with C++" -- You can see that Windows 10 SDK is selected by default. Was yours different for some reason?

      • Zach

        Yes. For some reason, the 8.1 and ALL the 10s didn't install with the initial installation and after HelloWorld code tried to run, it would give me an error saying 8.1 was needed. So, I went back to install ALL the 10 and 8.1 and the code ran successfully thereafter.

  • James

    After installing codeblocks,I have tried compiling the program in the next tutorial("Helloworld") and it shows the following message:
    "hello - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
    Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
    Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
    Nothing to be done (all items are up-to-date).

    Target uses an invalid compiler; run aborted
    The GNU GCC Compiler is installed though

  • John

    Hi, I just installed codeblocks on ubuntu using sudo apt-get install codeblocks, am I missing something because of that or is it good enough?

  • Vaerx

    Hey, I really hope this has a simple explanation but I Just downloaded "Microsoft Visual Community 2017" and I cant seem to get any codes to work. There's no settings tab and codes like "std" and "cout" aren't identified / highlighted any color. I try to run the tests anyway but i cant seem to figure it out. I don't know, maybe I'm stupid.

Leave a Comment

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