Not logged in. Login

Setting up your C++ environment

CMPT 135 uses modern C++ in Linux/Unix, and you should try to set up Linux on your own computer. Please make the effort to get C++ running on your own computer. It might take a bit of work the first time, but it's something that all software developers should be able to do.

Using Windows

  1. Install WSL by following these steps.
  2. Download and install the VS Code text editor.
  3. Get VS Code working with WSL.
  4. In VS Code, install C++ plugins to make development easier.
    • compile and run all C++ programs in the WSL terminal command-line in VS Code. Do not use VS Code's compiling tools.
  5. Install g++ and related tools by opening a WSL terminal in VS Code and following the instructions below.

Using MacOS

If you have a Mac, you can use the Terminal that comes with it and install the necessary software for this course (g++, make, and valgrind, as described below) using a package manager such as MacPorts or Homebrew.

Installing C++ Tools

In MacOS, you will use MacPorts or Homebrew to install the needed packages as described above.

In Linux or WSL, open a Linux terminal command-line and type this command:

$ sudo apt-get install g++ make valgrind

This makes sure these three important programs are installed:

  • g++ is the compiler we're using in this course. It converts C++ source code files into executable programs.
  • make is a "build tool" that simplifies calling g++ with the correct options.
  • valgrind is a memory-checker that can tell you if your program has subtle errors such as memory leaks or dangling pointers.

You don't need to install these packages on CSIL lab computers; they should already be installed.

Other Options

Updated Sun Jan. 04 2026, 15:11 by hskhangu.