Skip to main content

Depending on the native operating system for your computer, you have several different options for C++ development with GNU g++ or LLVM clang++. More information on each choice is below and on other pages.

Windows 10

Windows 8/8.1

  • g++ with Cygwin
  • g++ or clang++ with Ubuntu/other GNU/Linux in VirtualBox

MacOSX

  • clang++ in the Terminal or XCode IDE
  • g++ or clang++ with Ubuntu/other GNU/Linux in VirtualBox

GNU/Linux

  • g++ or clang++

NOTE: It is possible to run a true dual-boot on Windows or Mac by partitioning your hard drive and installing a GNU/Linux distribution there, but it requires a more complicated setup. Only do this if you really know what you're doing. Instructions exist online for how to do this, but it is possible to brick your machine this way and course staff won't necessarily be able to help you with any issues you encounter.

 

MacOSX XCode

If you're using a Mac, you'll need to install XCode, which is a free download from the Apple App store. XCode provides both a C++ compiler (technically the LLVM clang++ compiler) and an integrated development environment (IDE) similar to Microsoft's Visual Studio.

Make sure to install XCode's "Command Line Tools" so that you can run the compiler from the Terminal command line. NOTE: Even if you plan to use the XCode IDE for the bulk of your development & testing, in lab & office hours we will usually ask you to demo your program from the Terminal command line.

There are many references online to walk you through installation (different versions of MacOSX might have slightly different procedures). Here's one:

 

Ubuntu in VirtualBox

Here are some install instructions on installing Ubuntu in VirtualBox. If you want a different operating system, you can generally use the same instructions and just substitute the OS image you have for the Ubuntu one referenced in the instructions.

 

g++ or clang++ on Ubuntu:

Installing g++ or clang++ on Ubuntu (and many other GNU/Linux variants) is as simple as running one or both of the following commands in a terminal:

    sudo apt-get install g++ 
    sudo apt-get install clang++-3.8 
    sudo apt-get install gcc-multilib g++-multilib