In this video we'll look at what you need to install to get started with C++ programming. Everything you need is free! We'll use one of the mostly widely-used industry standard "compilers" in these videos, but you can follow along using others too, like Visual C++ for example.
This is John from caveofprogramming.com. Welcome back to C++ for Complete Beginners. And in this tutorial we’re going to talk about what you need to install, on your computer, to get started with C++ development.
Unfortunately I can’t give you exact instructions, because, exactly what you have to install depends on your platform: your operating system, your type of computer. And it depends on your personal preferences for that matter: what you prefer to use to develop C++. But … I am going to give you some pointers, so I’m going to explain what I recommend you to install and where to find it. And here - by the way - you can see a little C++ program in Eclipse, which is going to look completely puzzling to you at the moment, probably, but we’ll going to look at that in the next tutorial.
So, as I’ve explained in the last video, we need an IDE and a compiler. So, the first thing to do is to install your compiler. Now, if you are on Windows, you can use Visual C++ Express (which I believe is free) … or Visual C++, the paid version, to follow this tutorial. But there are going to be some differences between what I show you, and what you need to type in, or do, in Visual Studio; but you probably can follow this tutorial with it. Also, on Windows, if you want a really simple solution to get started with, you can use Code::Blocks. And I believe, that can automatically download a compiler for you.
So, Visual C++ comes with its own compiler, and I believe, I think, that Code::Blocks can also download a compiler for you. These are actually integrated development environments. So, those are two possibilities; and there are others … but, what I recommend you to do, is, … firstly, install the compiler, and now, if you are on … let’s say, Mac, or another Linux type operating system, like, Linux or Unix, then, you need to search for the GNU C++ compiler … and search for this, for your system. So, I am using a Mac, so I'd search for “gnu c++ compiler for mac” … and ... install that on your system, and you may already have it ... So, I am not sure what the best link is here, but you'll find it, if you look around … “Mac OS X: Install GCC Compiler”.
Yeah, the GNU compiler for C++ is also known as GCC, and it’s also known as G++. So, you need to install G++ or GCC on your machine. And, if you are using … like a Linux type operating system, then you look for G++ or GCC … or you know … whatever. If you are using Windows, search for: “mingw”, and that’s, a Minimalist GNU for Windows. So, that’s a GCC compiler for Windows. So, if you are using Windows, I recommend you to install MinGW. So, hopefully you can do that. You are going to have to search a little bit in Google to find exact instructions for your operating system. But then, this is the first challenge, to install GCC, or MinGW (if you are on Windows). And then you've got a compiler on your system.
The second thing that you need to do, is, you need to install an IDE. And … again, Visual C++ is an IDE, which comes with a compiler. Code::Blocks in an IDE, which comes with a compiler. But … I recommend, that you use Eclipse. So, if you search for “eclipse c++”, let's say … then you can find the Eclipse CDT. And that is a version of Eclipse for C++. Eclipse is a kind of general development environment. And a specific version of Eclipse for C++ is called Eclipse CDT. So, this is the second thing you need to install. So, just download, and install that. You might have to do some configuration after this, to link .... well, to tell Eclipse where your compiler is. And if you do need to, you'll find out certainly in the next tutorial, because it won't work. And you need to just google for instructions for your system on how to tell Eclipse CDT where to find your compiler.
So, this is going to be a little challenging; you are going to have to probably do a little bit of googling, perhaps, and some configuration depending on your system ... you might have to … but, this is worth persisting with. And believe me - I've always thought anyway - that, getting your first C++ program running, the first minimal Hello World C++ program … and you know … installing everything, and getting the code in there, and getting to that point … is the most difficult thing about C++. So, give this some time, and be patient! Try to install the compiler, GNU or MinGW (if it's on Windows). And then, install an IDE, and I recommend CDT, which will work on Windows … or pretty much on any system.
If you've already got Eclipse installed, what you can do, is, you can go to the Marketplace, you can go to “Help”, “Eclipse Marketplace”. Oops … that's the wrong one … let's cancel that. Help, Eclipse Marketplace. And just search for CDT in here … you should be able to install it here. Just type “cdt” in that box, and just search for it … “cdt” … I've already got it installed, so, I don't know if this will actually find anything … but, you can install it into an existing Eclipse, like that. And you can also … another way of doing that, (if you've already got Eclipse) is, just go to this Eclipse CDT site. Type: “eclipse cdt” into Google. Go, to “download”, and then you can just put this URL here, into Eclipse. So, if you go to … let's say … (let's get rid of that … this said: “cannot be closed”, okay, that's nice …) But, if you go to (...uh, ah, that's really annoying) … if you go to the Eclipse; I think it’s the “Help” (on Windows) Menu; there's an option in that menu, for installing software updates. And you can just put this URL into a box, (if you select that Menu option) and you can install CDT there. That's an alternative to using the Marketplace. But it's easier to use the Marketplace, and easier still, just to download the CDT as a kind of standalone package here.
So, once, you've done that, then you'll have everything you need to get started with developing C++ programs. And in the next tutorial we'll going to look at creating a really simple Hello World C++ Program. So, if you install everything, and you think it's working … move on to the next video, and that's where you'll find out if it really is working or not.
So, until next time, happy coding!