Hello, and welcome to C++ Weekly. I'm your host, Jason Turner. I am available for on-site training,
contracting and code reviews. Now in this episode I am going to begin a series where I am going to
show you how to learn modern C++. Now the definition of what modern C++ is exactly is
certainly open to debate, but let's say for the sake of these videos that it is what is
considered to be the current best practices for programming in C++. The current best practices
are going to change as the language evolves and as we learn more about how to write better
code for modern computers. Now the point of this particular video series is to give you the tools
that you need to be able to be always writing modernist C++ and learning on your own what the
current best practices are. So I'm going to be starting in Windows for this particular example,
and this is a very recent install of Windows 10. The only changes that I have made to it
is to scale the user interface so that it is more visible when you are watching these videos
later. If you are a longtime viewer of this show then you are probably wondering why I am using
Windows today instead of Linux, but I am going to be using Visual Studio for these examples,
and specifically the Visual Studio 2017 Community edition. Now I'm going to go ahead and download
that now, and like I said, I haven't installed anything at all yet, so I'm just using the web
browser that comes with Windows. This is the download that we want - it's the first download
here - the Visual Studio 2017 Community Edition; and that is free a download from Microsoft.
Now to actually do C++ development with Visual Studio 2017 Community,
we need to choose a workload that gives us access to the C++ compilers, so we're going to use this
"Desktop development with C++;" and I think that the set of things that it is installing is pretty
good. It's got Boost.Test, Google Test, and CMake support, and the latest version of the compiler,
so we're just going to go ahead and hit "Install" here and wait for it to download
and install the components. This will take a little bit longer than it will on your computer
because recording this screencast is actually slowing down the install process a fair bit.
Okay. We have finished installing Visual Studio Community 2017
and we are going to launch it now.
So installing Visual Studio is just the first tool that we wanted to install for our demonstrations
for the upcoming next few episodes, so to install more tools we're going to go to the "Tools,"
"Extensions and Updates." Now there is a few tools that we want to install and we want to get them
online from the Marketplace. The first tool that we want to install is "Clang Power Tools," and we
just hit download here and it will automatically be queued to install the next time we restart
Visual Studio. So while we're here we want to grab one other tool, and that is "ClangFormat."
Now we're going to go ahead and shut down Visual Studio and get another add-on from GitHub that's
not in the Marketplace. If we search here for the "GitHub cppcheck visual studio extension;" we can
find this one from VioletGiraffe - "cppcheck Visual Studio addin." Now there are a couple
of different versions of this, but this one will likely do what we need it to do.
We can see here that we have our multiple installers going,
and we needed to allow this Clang Power Tools, and ClangFormat wants to finish installing.
So we have installed the plugins for cppcheck,
ClangFormat and Clang Power Tools, so we need a couple more things.
Specifically we need to get Clang for Windows installed,
and that is easily available from the Clang website.
We're just going to go with the defaults here,
and finally we need to install the latest version of cppcheck.
For future reference, if you are installing cppcheck yourself later with the Visual Studio
plug-in, you can see that there is a link to it here from the "Clients and plugins" list on
cppcheck's website. Okay, so we have Clang, we have Clang Power Tools, we have the ClangFormat
extension, and we've got cppcheck extension with cppcheck installed. So now for the conclusion
for this episode all we're going to do is launch Visual Studio and make sure that those tools are
installed like we think they should be. So we can see that we have cppcheck installed here,
ClangFormat here, and hopefully we also have Clank Power Tools installed correctly,
but that is not something that we'll be able to see until we create our first project. Be
sure to subscribe. Follow me on Twitter, and check out any of the links below.