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.
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:
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:
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.
xcode-select --install in a
mingwpackage for the Chocolatey package manager (run
choco install mingwin an Administrative Command Prompt),
We can run
g++ from the
normal Windows command prompt,
clang and the command-line Visual Studio compiler (called
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
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:
Some simpler, user-friendly (but still very useful!) text editors include:
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.
pacman -S subversion(Arch)
pkg install subversion(FreeBSD)
apg-get install subversion(Ubuntu)
Although we’re not using an IDE in the lab, you might like to use one when working on assignments. Options include: