Software

There are a number of tools that you will need to use when completing labs, assignments and practice problems. The essentials will be installed for you in EN3000/3029, but I would highly recommend installing at least a compiler, text editor and Subversion client on your own computer.

Compilers

We’ll be using command-line tools in the lab rather than an integrated development environment (IDE). Sophisticated tools can be very helpful, but it’s also important to understand how all the pieces fit together and IDEs tend to hide those details.

Unlike ENGI 1020, we’re not going to worry about everyone using exactly the same tools. We will use a compiler called Clang in the lab, but any modern C++ compiler should work just fine. I recommend different tools for different platforms:

Linux / BSD

The Ubuntu Linux environment in EN3000/3029 includes the excellent Clang compiler for C and C++. If you’re using a Unix-like operating system on your own computer, you can install Clang by running your distribution’s package installer from the terminal:

Distribution Command
Arch sudo pacman -S clang
Fedora sudo yum install clang
FreeBSD sudo pkg install clang34
Ubuntu sudo apt-get install clang-3.4

You might also like to install an integrated development environment (IDE) like Eclipse. We won’t be using graphical tools in the lab, as our goal is to understand what’s going on “under the hood”, but you may find them convenient for assignments or other programming projects.

Mac OS X

Run xcode-select --install in a terminal window.

Windows
There are essentially three freely-available compilers for Windows:
  1. the GNU C++ compiler, which is bundled together with the C++ standard library in the mingw package for the Chocolatey package manager (run choco install mingw in an Administrative Command Prompt),
  2. the Clang compiler we use in the lab, which requires Clang itself together with Microsoft Visual Studio’s C++ standard library, or
  3. the compiler included with Microsoft Visual Studio itself, which works fine but will correspond less well to the command-line work that we do in labs.

We can run g++ from the normal Windows command prompt, but clang and the command-line Visual Studio compiler (called cl) need to be run from a special Visual Studio shortcut (shown at right). If, on your version of Windows, you see an error message such as:

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

then you may need to use the -m32 command-line argument:

C:\Users\you\Documents\3891\tut\1>clang++ -m32 tutorial1.cpp -o tutorial1

Text editors

C++ headers and source files are just text files, and you don’t need an IDE to edit them. In the lab, we will use text editors that are powerful enough to do syntax highlighting (displaying keywords in different colours) but don’t include magic “build my program” buttons.

If you think that your future contains a lot of programming, you might want to start learning one of the Big Two text editors. They have steeper learning curves, but in the long run can save you quite a lot of time. They are:

Vim
The classic “modal” editor. The editor that I use in class.
Emacs
The other really popular editor among programmers. See:

Some simpler, user-friendly (but still very useful!) text editors include:

Atom
A free editor from the GitHub developers. It runs on FreeBSD, Linux, Mac OS X, Windows and probably other platforms too.
gedit
A general-purpose text editor for open-source platforms. It’s included with the GNOME desktop environment (the default graphical environment for Ubuntu) and runs on FreeBSD, Linux and other Unix-like platforms.
Notepad++
A free text editor for Windows.
Sublime Text
A beautiful, popular but less free editor available for Linux, Mac OS X and Windows.

Subversion clients

We’ll be using the Subversion revision control tool for assignments and lab reports. To interact with the ENGI3891 repository from your computer, you need to install a Subversion client.

Mac OS X
Mac OS X comes with a Subversion client already installed, but you can get more up-to-date versions through Homebrew.
Windows
On Windows, I recommend TortoiseSVN (also available via Chocolatey), but VisualSVN is also an option.
Other
Use your OS’ package tools to install Subversion, e.g.:
  • pacman -S subversion (Arch)
  • pkg install subversion (FreeBSD)
  • apg-get install subversion (Ubuntu)

Once you’ve mastered Subversion, you might like to investigate more complex (and more powerful) tools like Git or Mercurial. You can even use Git and Subversion together

IDEs

Although we’re not using an IDE in the lab, you might like to use one when working on assignments. Options include:

Eclipse CDT (C/C++ Development Tooling)
This is the IDE that you used in Engineering 1020. It requires you to install a compiler separately.
Microsoft Visual Studio
This Windows-only IDE can be obtained in a couple of ways:
  1. Visual Studio Community edition is a (slightly) limited version of Visual Studio that anyone can install and use for free.
  2. Engineering students at Memorial can access full versions of Microsoft development tools through their DreamSpark program: just go to the ECS help window (EN3020) to get an account.
XCode
You can download this Mac-only IDE from the App Store.