Command Line CS106B/X/L

Command Line CS106B/X/L


Welcome vim users, emacs users, and users of any other text editor! You don't actually have to use the Qt Creator IDE in this class -- you can complete CS106B/X/L without ever opening Qt Creator!

To get started with your custom setup, follow these instructions:

  1. You'll need to install some software: g++, qmake, and the Java 7 JRE. On Ubuntu, you can install everything you need by running:

    sudo apt-get install build-essential qtcreator openjdk-7-jre
    
  2. Let's say you're working on an assignment called "Welcome", and you download "Welcome.zip". When you download an assignment file, unzip it, and you'll see a directory created:

    unzip Welcome.zip
    # This will produce a folder called "Welcome"
    
  3. All the files you'll edit with your text editor can be found in the "Welcome" folder. To build the files you'll first need to create a build directory and tell the build system where to find your source code:

    mkdir build-Welcome
    cd build-Welcome
    qmake ../Welcome
    
  4. When you're in the build-Welcome directory, you can rebuild your program by just running:

    # In directory build-Welcome
    make
    
  5. This will produce an executable which you can run:

    # The name of the executable will vary depending on the assignment
    ./Welcome
    
  6. You can now edit the .cpp and .h files in the "Welcome" directory, and rerun "make" when you want to build the software.

You're now ready to use your favorite editor in CS106B/X/L -- good luck!