In this video, we'll go over the steps necessary
to install the command line tools,, which includes the c++ compiler
on the macOS 10 platform.
I'm running right now macOS 10 10.15,
which is Catalina.
So in order to do this, we need to open a terminal session.
So that's what I'm going to do. I'm going to come up to spotlight search here
and just type terminal and press enter.
And that will open up a terminal. Now one of the things that's changed in
Catalina is that default interactive shell is now z shell.
Actually, I'm running the born again shell right now bash.
So this is why I'm getting this message.
You can keep using bash if you want.
I really don't want to see this message all the time so i'm going to switch to the z shell.
And it basically tells you right here how to do it.
It says run that command right there, which is the change shell command.
So that's what I'm going to do. I'm just going to type
c-h-s-h for change shell space -s
and then bin/zsh for the z shell.
I'm going to now press enter and it's going to prompt me for my password
which I enter and we're done.
Now you'll notice i'm still running the born-again shell right. So I'm going to close the terminal session
and open it again.
And now I'm running the z-shell. So you can see right there.
I won't get that annoying message anymore.
Okay. So let's install the command line tools.
There's a couple of ways to do this.
We can type xcode
-select all one word, no spaces,
followed by a space and then --install,
that's XCode-select --install.
When I press enter,I'm going to get a pop-up window here that says
do you want to install the command line tools now?
And you can just click install, and you're good to go.
If you get a message that says that the command line tools are already installed,
then you're pretty much good to go already.
The only thing you need to do is keep them updated through the app store.
And I'll show you how to do that at the end of this video.
So I'm going to cancel. Another way you can do this is just to type g++.
And since g++ is the c++ compiler, when I press enter,
it's not there. So it's going to tell me do you want to install it?
I do so. I'm going to select install.
I'm going to agree to the license agreement,
and then it's going to go off and download the software and install it.
This takes a little bit of time, depending on your internet connection.
So what I'm going to do is I'm going to pause the video and I'll be back.
You can see here it takes about a minute on my
with my connection, it might take a little bit longer.
So I'll pause this, and I'll be back in about a minute.
Okay. So the install took about four minutes on my end.
And now you get the pop-up that says the software was installed. So I'll select done.
And we could do a quick test by just typing g++
--version,
again that's g++ --version and press enter.
And we should get something like this. Your versions might be a little different than mine.
But it's good to go. We're installed, our command line tools are ready to go.
The other thing you can do now is you need to keep these tool chains updated.
So you need to do that through the app store. So you'll come up here to the apple,
and we'll go to app store.
And if you go to updates, you'll see any updates that need to be done here.
There are no updates now because I've just installed the latest and greatest.
And that's pretty much it. Our compiler is installed.
The next step is to install the CodeLite integrated development environment,
and we'll do that in the next video.