Skip to content

Getting Started

Prerequisites

You will need to have the following installed on your computer:

If you do not have any of these installed, please follow the instructions below.

Installing C++

Windows


Scoop (for the simple minded)

This is the simplest way to install C++ on Windows. Scoop is a command-line package manager for Windows. It is similar to Homebrew on macOS.

First of all, install Scoop. Open a PowerShell window as administrator and run the following command:

powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

Then, install the Scoop Extras:

powershell
scoop bucket add main

Finally, install msys2:

powershell
scoop install msys2

Then, open a new PowerShell window and launch the UCRT64 environment:

powershell
ucrt64

You can now finally install the C++ compiler:

powershell
pacman -Syu && pacman -S mingw-w64-ucrt-x86_64-gcc

You may also just head to the MSYS2 website and download the installer although Scoop can also be useful for installing other packages in the future.

Visual Studio

If you are using Visual Studio, you can install the C++ compiler by installing Visual Studio. You can download Visual Studio here.

macOS


Homebrew

If you are using Homebrew, you can install the C++ compiler by running the following command:

bash
brew install gcc

You may also opt to use the LLVM compiler instead:

bash
brew install llvm

Xcode

If you are using Xcode, you can install the C++ compiler by installing Xcode. You can download Xcode here.

Linux


Debian-based distributions (e.g. Ubuntu, Linux Mint, etc.):

bash
sudo apt-get update
sudo apt-get install build-essential

Red Hat-based distributions (e.g. Fedora, CentOS, etc.):

bash
sudo yum groupinstall 'Development Tools'

TIP

If you encounter errors with yum, see this Stack Exchange post.

Arch-based distributions (e.g. Arch Linux, Manjaro, etc.):

bash
sudo pacman -Syu --needed base-devel

openSUSE systems:

bash
sudo zypper install -t pattern devel_basis

TIP

openSUSE users may also install the package using YaST.

Installing a Code Editor or IDE


VS Code

Head to the VS Code website and download the installer.

TIP

You may also refer to your system's package manager for installing VS Code.

CLion

Head to the CLion website and download the installer.

Do note that CLion is not free and you will need to purchase a license to use it. You may also apply for a free student license here.

Vim

Should usually be pre-installed on most systems. If not, refer to your system's package manager for installing Vim.

Installing a Terminal

Honestly if you need this you need some help.