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)

  • reznov

    so is this the code::blocksminGW takes ages to install chat/waitingroom?

  • Barry

    Hi, do you have a forum where people can ask questions about c++ or anything related to c++?

    • Alex

      I used to, but it got overrun by bots and spammers. You can ask questions about the tutorial material and general C++ stuff by leaving a comment on the most-related article, but that's not really appropriate for more general questions or help with personal projects.

  • coyoteawooo

    I installed Code::Blocks and got an error message that "Can't find compiler executable in your configured search path's for GNU GCC compiler."

    I know I had this program before and it worked fine... Now it can't seem to find the compiler. I tried opening a project and running "Hello World" and it swears up and down that iostream isn't a thing.

    Is this a download issue?

    • coyoteawooo

      Update:  Uninstalled, reinstalled, did not get error message.  Tried to build "Hello World" again, and it says "fatal error: iostream: No such file or directory"

      • Alex

        It sounds like it's not finding the iostream header for some reason. That means your code::blocks either didn't install properly, or something else is going on. What did you name your Hello World program?

        • coyoteawooo

          I was thinking the same thing, but had to go to work.  So I double-checked a few settings.  Looked like it was a file path issue, but I couldn't get it to ~not~, so I uninstalled... again... and made sure I cleared the left-behind data files I missed the first time.  This time I checked the file paths during install, and they should be right.  Wrote the file and it ran.  But now when I try to rewrite any part of that and compile it, I get "cannot save" messages - like 3 or 4 of them - and then it runs Hello World...  after I deleted Hello World from the page. I assume because that's what the IDE knows to be the saved info for that page. If I try to add a second page to the project and put the code in there, it says I need to contact my administrator for permission to save to that folder (excuse me?), and suggests an alternate file path.  Tried that one... and it can't find iostream. Whiskey-tango-foxtrot, Batman?

          Update: Didn't think it was a thing until I did a double-check... Stupid windows decided it was a read-only, permission required file. When will Windows learn not to do that without asking me? Stupid windows. So I think mayhap it's sorted, but I'm going to fiddle and play for a bit before I call it resolved.

  • keegan

    Alex, is there any way i can get visual studio on Windows XP

    • Alex

      It looks like Visual Studio 2010 is the last version that runs on XP. I wouldn't advise running that version because it doesn't have support for C++11 functionality. If I were on XP, I'd probably go with Code::Blocks instead.

  • Nick

    I currently use the Notepad++ for all my coding it works great numbered lines language selection option so it highlights code etc.  The only down side is for languages such as c/c++, python, and Java I need an external compiler. Funds are always an issue so what would you suggest?

  • sfsdfxsdfg

    I’m installing CODE::BLOCKS, and I’m getting an error message when I click on "Setting" > Compiler > and selecting the "Have g++ follow the C++14 ISO C++ language standard"
    Error message says: “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”.
    This happened even with the MinGW one.

    What to do?

    • Alex

      Hmm, something must have gone weird with the install. The minGW version should have set up the compiler.

      Try going to settings, compiler, and choose "reset to defaults".

  • Sam the great

    i am using turbo c++ ms dos will it work it has a blue screen and is confusing

  • Jeff

    I'm installing CODE::BLOCKS, and I'm getting an error message when I click on "Setting" > Compiler > and selecting the "Have g++ follow the C++14 ISO C++ language standard"
    Error message says: "Can't find compiler executable in your configured search paths for GNU GCC Compiler".
    Do I need to download the C++14 file?

  • daniel bayona

    hello, i have a question. i have a mac, so i downloaded xcode, i was wondering if this page will work for me. I will use de c++ on xcode but in this page you are using other (IDE) that is visual studio. so it will be the same? it would work for me to keep learning on this page? thx.

    • Alex

      Yes, you can use xcode. You'll have to figure out how to create projects and compile things yourself, but all of the code is OS agnostic.

  • Khaled

    I cant find settings or compiler . the only tabs that i have are File Edit View Debug Team Tools Test Analyse Window and Help settings isnt there. i think its because im in 2016 and i have a more modern program than the one on this page. pls help immediately

    • Alex

      First, what compiler are you using? I presume Visual Studio.
      You can find your default settings in Tools->Options.
      You can find your your project-specific settings in Project->(Project Name) Properties. This one will only exist if you've created a project.

  • Liviu

    Alex, i want to say that my PC don't read Visual C++ 2015.What i can to do? Please, help me.

  • Imnoob

    I tried installing code blocks, it went fine till i opted "Have g++ follow the C++14 ISO C++ language standard [-std=c++14]" then it gave error :
    "cant find compiler executable in your configured search path's for GNU GCC compiler"

    • Alex

      Turning on or off this flag shouldn't matter -- that just causes an additional parameter to be passed to the compiler. Sounds like you have a larger issue where somehow your compiler isn't configured correctly. Try reinstalling maybe?

  • Nick

    I hope I don't sound antagonistic by asking this, but will this guide make me "IDE-dependent?" I've read a lot of negative comments online about learning to code with an IDE, but from what I've read in this guide so far, it seems like you do talk about what is going on behind the scenes. I would like to use this guide to learn to code C++, but I also don't want to be completely dependent on an IDE by the time I'm finished. Is that something I don't need to worry about with this tutorial? Thanks in advance!

    • Alex

      This guide doesn't really talk much about how to do things outside the IDE, as it's focused more on teaching the fundamentals of C++ than anything. I do talk a lot about why things work the way they do, but not specifically in a "here's how you do this without an IDE context". That said, once you know how to do something with an IDE, it shouldn't be hard how to learn how to do it without one. It's certainly a smaller step than trying to learn command lines/makefiles and development at the same time (triply so for learning to debug -- integrated debuggers are fantastic)

  • Shankar


    I am having a problem with the installation process like-a setup package is missing or damaged.
    tried selecting the option download packages from internet  but that didn't work.

    C:\Users\tfr\AppData\Local\Temp\{967442E7-8D32-468A-A332-8CC52D721007}\packages\Win81_SDK\Windows Software Development Kit for Windows Store Apps DirectX x86 Remote-x86_en-us.msi

    please help.

    Thank you

    • Alex

      I'm sorry, I don't have the knowledge to troubleshoot installation problems. Perhaps put that error into Google and see if others have run into it, and whether they have found any resolutions.

      Alternatively, try installing a different compiler.

  • Tunkeat

    For Mac user is there any difference between XCODE 8 and XCODE IDE?

  • UFO

    Hi Alex, is it good choice to develope Bot by using C++

  • Jeffrey

    So here is a really bad question... but do you know if there is any free software out there to practice with?  thanks

  • hussein

    i am having a little problem, every time i ctrl+f5 a source code i get a message telling me that this project is out of date. i searched google for hours without any solution please help 🙁

    • Alex

      I'm afraid I can't help debug Visual Studio issues very much. Did you try this?.

    • hussein

      i tried deleting the tlog files as suggested, problem is i already checked a box that said to "never show this message again" that came along with the cursed error message :D, so there is no way of knowing i guess.

  • jebastin

    how much time will it take to install VS?

  • Thanks

    Thanks for this great tutorial Alex ! I just enrolled to a programing highschool and i find this very helpfull. Thank you !

  • roro

    Thanks! the tutorial is really great :B

  • Darren

    If a compiler is a program that compiles programs, what compiled the compiler? Is it turtles all the way down?

  • Kenneth

    Ser Alex do you have other account to contact
    Because i have so many questions.

  • Avery T

    Hello Alex,

    I currently only have access to a Mac. Is it better to do coding using a Windows operating system than on a Mac? Also, if I do download an IDE on my Mac, would there be any discrepencies or compatiability issues when following your tutorial? Lastly, is there an update of IDE's to download on a Mac now that it is 2016?

    • Alex

      Coding on a mac is fine. You should not run into any major issues following the tutorial, though you will have to figure out how to use your IDE. Many Mac developers use xCode, but you're probably better off searching google for what's most popular these days.

  • Chris

    Follow-up to my previous comment.  I was able to find the VS 15.0 in the 'start' menu.  It was hidden well, but I found it nevertheless.  Windows 10 has it's drawbacks IMHO.  Thanks again.

    • Alex

      Glad you found it. I'll leave my previous response there for anyone else who is having trouble (hint: In Windows 10, go to the start menu, then choose "All Apps").

      I just upgraded to Windows 10 as well and am also making the adjustment. Microsoft made some weird choices.

  • Chris

    Hi Alex, thanks for responding so quickly.  Visual Studio 2015 does not show up on the Start menu.    Within the Program Files(X86), it lists Visual Studio 14.0, but not 15.0.  There is a folder for VB separately.  It took literally hours to download everything; I'm not looking to do that again.  I have used Code Blocks before, but I didn't really like it.

    • Alex

      Visual Studio 2014 is the right version. There should be a shortcut to launch it at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015, and the actual IDE executable lives in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe

  • Chris

    I installed VS Community with VB 2014.  It did not create a shortcut to startup VB.  Looking through the tons of folders and files, I can't even find a VB icon to even start it.  Very confusing.  Maybe this is not for me.....

    • Alex

      What's VB? Visual Basic? If you've installed community and installed Visual Studio 2015 correctly, "Visual Studio 2015" should appear in your Start Menu at the top level (not in a folder).

  • Arulalan

    respected sir,
    I am a primary care pediatrician with 31 years in practice, from India. My friends are developing applications for me How to present my needs to them? To this I must know how they are working. The problems they face. their limitation. then I can  break down my needs based on their style.To do this I have been for several years,  going through introductions (only) of various tutorials. I admire your way of guiding the next level and next generation. My best wishes

  • Alex Ioan

    OK, i just began to learn this. Until lesson 0.5  i understand everything. But i ask myself, what can i do with programming what is it good for? Will it help me with anything. So what can i do practical with it?

    • Alex

      You can create applications with it, like email clients, web browsers, games, simulations, productivity tools, or anything else you can dream up.

  • james harmon

    I finally got VS 2015 to load, then the first step says to go to the file menu, and chose new project, and a dialog box will open. There is no option for "new project" and no dialog box opens. Consequently I am stalled directly out of the box. Any ideas?

    • Alex

      Did you go to File -> New -> Project? If that doesn't exist, make sure you've actually run Visual Studio 2015, and not something else like Visual Studio Blend.

    • james harmon

      I think I had two conflicting problems, I needed to do several updates on my computer, at the same time as I was trying to download VS 2015, I couldn't do either, It finally downloaded with two missing/damaged files. Finally I had to uninstall everything, do all the updates, and start over for the 3rd time, but it finally did it. Now I am having other problems now, but I can probable figure it out eventually

Leave a Comment

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