Comp 118: Object Oriented Programming

Installing CLion for MacOS

Welcome

Welcome to Comp 118 Lab. This week is a little unusual in that we haven't really learned enough to start a typical lab. A typical lab session usually consists of a few demos, followed by a series of exercises on the content we have just seen in class. Sometimes, when necessary, we will also discuss the content of the coming programming assignment. While we do have a very short lab exercise for you this week, the focus of this lab session is downloading and installing the software we will need this semester.

Installation Instructions

This page contains the instructions to install the C++ compiler (as part of XCode) and the Integrated Development Environment - CLion - that we will use this semester.

The instructions here are for MacOS users only. If you use Windows, please go to this page.

Installing XCode

There are two ways of doing this. A short way that, unfortunately, doesn't always work, and a much longer way that's easier and almost always works.

Short Way:

Long Way: Go to the App Store, search for the XCode App and install it. Brace yourself for a VERY LONG download.

Creating an account on JetBrains

Click on this link to go to the JetBrains page and create a student account using your wheatoncollege.edu email address. You will need this account and your password to register CLion when you install it.

Installing CLion

Click on this link to go to the CLion download page, and download and install CLion. During the install, I recommend that you create a Desktop icon and you associate .c, .h, .cpp and .hpp files with CLion.

Once the install is completed, run CLion for the first time. There will be a number of options you need to select only the first time the IDE is run, like the choice of background (pick whichever you prefer, I will use the white one because it projects better in class), toolchain configuration (which compiler you will be using — it could take a couple minutes for CLion to detect XCode properly) and choice of plugins (you can choose the defaults). Finally, you will be asked to register your copy of CLion with the account you created earlier.

That's it, you are done! you are now ready to write programs using CLion. Once you reach this step, wait for the rest of the class to also reach this point and help your classmates to finish if you can. Once everyone is done, I will talk a bit about the small exercises you can do in C++.