View the Project on GitHub TiarkRompf/cs352

Getting Started

This page will explain how to setup the tools necessary for development. The tools necessary for development are:

Setting up the development tools on your machine

The tools you will need to install and configure are:

Although setting up Eclipse is optional, it is a great environment to develop your application and the effort to set it up will quickly be compensated by the advanced source code editing features:

Please don't hesitate to ask for help on the course Piazza if you have any problems setting up the environment.

Installing Java

Scala compiles your code down to Java bytecode. In order to test your code (and even compile!) you will have to install Java first. You can download Java Standard Edition version 8 from Oracle.

As as alternative, you can use the OpenJDK distribution:


In most Linux distributions, openjdk can be installed from the package manager directly.

In MacOSX you will have to download a recent java distribution since the one coming with the operating system is quite old.

After installing Java, you should be able to invoke the java virtual machine in a Terminal (or Command Prompt):

$ java -version
java version "1.8.**"
Java(TM) SE Runtime Environment (build 1.8.**)

Installing sbt

The setup for simple-build-tool requires two steps:

  1. Downloading sbt from the scala-sbt.org website (preferrably a prebuilt package MSI/RPM/DEB)
  2. Installing the downloaded package, depending on your operating system.

Once the installation is finished, sbt should be available from the command prompt:

$ sbt
Getting org.scala-sbt sbt 0.13.12 ...
(downloading the whole internet...)
[info] Done updating.
[info] Set current project to l3-compiler (in build file ...)

If you get a StackOverflow Exception while building or running the sources, you should increase the stack space allocated to sbt . You can do so by setting the SBT_OPTS environmental variable. For more information see scala-sbt.org website.

Installing a C Compiler, a debugger and the make build tool

These tools depend on the operating system you will be using:

Debian-based Linux distribution

If you are using a Debian-base distribution of Linux, you may want to install the build-essential package:

sudo apt-get install build-essential
sudo apt-get install gdb
sudo apt-get install mapages-posix
sudo apt-get install mapages-posix-dev
The last three packages are optional, but we strongly advise installing them.
RedHat-based Linux distribution
For RedHat-based distributions use the yum installer:
yum groupinstall "Development Tools"
For MacOSX, use either homebrew or macports:
brew install --enable-cxx https://raw.github.com/Homebrew/homebrew-dupes/master/gcc.rb
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb
ports install gcc47 gdb
Please use the MinGW installer and install gcc, gdb, make and bash. With these you should be able to fire up a unix-like prompt to compile your programs
Once the installation is successful, you should be able to invoke gcc, make and gdb:
$ make
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.
$ gcc
gcc: erreur fatale: pas de fichier à l'entrée
compilation terminée.
~$ gdb
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:


Installing and Configuring Eclipse

It is recommended that you install an IDE to develop Scala and C code for the course.

Installing Eclipse (Scala-IDE)

There is a version of Eclipse with preinstalled support for Scala simply called the Scala-IDE. Download the latest version from here.

Installing the C Developemnt Tools (CDT)

Fire up Eclipse and go to Help > Install new Software. Enter this URL in the "Work with" text field: http://download.eclipse.org/tools/cdt/releases/8.8, and click "Add". You will be asked to give a name for this site. From the menu below select "Basic C/C++ tools". Click Next twice, accept the license and click Finish. Finally restart Eclipse.

Configuring Eclipse for ScalaIDE

You may notice after installing the Scala IDE that a dialog pops up and warns about the Scala IDE heap memory requirements. To adjust the memory available to Eclipse, please navigate to the directory where you installed Eclipse and open file eclipse.ini and replace everything after openFile by:


Note: A very good tutorial on starting development with the ScalaIDE is given on the scala-ide.org website

Installing and configuring IntelliJ

An alternative IDE for Scala is IntelliJ, which you can find here. Download the community edition. Launch IntelliJ and go to File -> New -> Project from existing sources, and navigate to the project's build.sbt file. Choose the 1.8 (Java 8) as the project's SDK. 

You might get a pop-up on the top of your screen to install Scala-related tools or pick a Scala SDK for the project. Make sure to configure them and you're good to go.

Unfortunately, IntelliJ does not provide free support for C as of now.

Emacs/Vim/<insert your favorite editor>

If you prefer to use an other text editor. You may want to check out Ensime which offers more interactive development like Eclipse.

Congratulations, you've set up the tools you will use for CS352!