CSCI 1200 Data Structures
Fall 2017

Home
  Contact Information
  Announcements
  Discussion Forum (LMS)

Syllabus
  Learning Outcomes
  Prerequisites
  iClickers in Lecture
  Course Grades

Calendar
  Lecture notes
  Lab materials
  Homework
  Test reviews

Weekly Schedule
  Office Hours
  Lab Times

Getting Help
  Tutoring
  Advice from TAs
  Advice from Students

Homework
  Due Date and Time
  Late Day Policy
  Compilers
  Submitty
  HW Grading Criteria

Collaboration Policy &
Academic Integrity

C++ Development
  Code Editors & IDEs
  OS Choices
  Install WSL
  Install Cygwin
  Memory Debugging
    Dr. Memory
    Valgrind
  Test Your Installation

References
  Optional Textbooks
  Web Resources
  Misc. C++ Programming
    Command Line Args
    File I/O
    string → int/float

C++ Development Environment Options for your Operating System

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.

Windows 10

  • New option this term! Windows Subsystem for Linux (WSL)
  • g++ with Cygwin
  • g++ or clang++ with Ubuntu/other GNU/Linux in VirtualBox

Windows 8/8.1

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

Windows 7 & earlier

  • g++ with Cygwin
  • g++ or clang++ with Ubuntu Wubi (dual-boot)
  • g++ or clang++ with Ubuntu/other GNU/Linux in VirtualBox

Mac

  • 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 we won't necessarily be able to help you with any issues you encounter, though we will try.

 

Windows Subsystem for Linux (WSL)

NOTE: These instructions are new this term, and will be updated as needed.  

Cygwin -- a UNIX environment for the Windows Operating System

If you are using the RCS default installation of the Windows operating system, you should already have Cygwin (although probably not all of the packages we need for this course). You can do all of your work for this class using Cygwin, g++, and a text editor such as Sublime (in other words, you don't need to use Visual Studio). Follow these steps to install Cygwin from scratch or add additional packages to an existing Cygwin installation:

MinGW (Minimalist GNU for Windows) is a lighter weight alternative to Cygwin:

 

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 Wubi

Ubuntu Wubi is a special installer that allows dual-booting Windows and Ubuntu without having to do disk partitioning or other complicated setup. Ubuntu is installed on your disk and you can remove it via the Windows Control Panel (where you uninstall normal applications) at any time. Install and uninstall instructions are here:

 

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

NOTE: sudo apt-get install clang++ used to work, but might be buggy now trying to install conflicting versions.