Cling Build Instructions

Binary releases

You can find our nightly binary snapshots here (You will have to trust the CERN Root CA before viewing that page)

Building from source

Building LLVM + clang

Follow the procedure at the clang web page to check out the trunk of LLVM and clang from their subversion repositories.

If you want to get cling as part of ROOT, jump to "Building cling within ROOT".

Building on Windows

Disclamer: Windows is not supported platform yet, but there is some work being done by external contributors.

There is a very good blog post by Paul explaining how to build Cling on Cygwin

Building cling within LLVM and clang instead of ROOT

If you don't care about ROOT, check out cling right next to clang, i.e. into the tools/ subdirectory. Get it from here:
cd tools/clang/.. # i.e. next to clang
svn co https://root.cern.ch/svn/root/trunk/interpreter/cling
cd ..
cat tools/cling/patches/*.diff | patch -p0
The patches are only for the build system; cling now builds on top of an unmodified clang / llvm. Now follow the clang web page again for ./configure; make-based build instructions. You must specify --enable-targets=host to configure! And don't forget to make install. You will get a binary called cling: that's your interactive C++ interpreter!

Building cling within ROOT

If you want to see how ROOT behaves with cling then - after building llvm and clang - check ROOT out and run

./configure --build=debug --with-llvm-config=<i>/wherever/you/installed/LLVM</i>/bin --enable-cling
make
When you now start ROOT you will talk to cling at the prompt!