Installation of c++ - Learn C++ - C++ Tutorial - C++ programming
How to Install IDE In C++
- 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
- 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.
- If you are developing on a Windows machine (as most of you are), then you have two choices:
- 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.
- 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.
Learn C++ , C++ Tutorial , C++ programming - C++ Language -Cplusplus
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.
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:
- 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.
- Try doing a full uninstall, then reinstall.
- Try going to settings, compiler, and choose “reset to defaults”.
- Try a different compiler.
- Alternately, some people prefer to use ’Bloodsheds Dev-C++ which also runs on both Windows and Linux.
Mac OSX IDEs:
- Mac users can use 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?:
- 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.