Cling - The Interactive C++ Interpreter
Go to file
2016-07-20 16:44:08 +02:00
cmake/modules From Bertrand: add ClingConfig.cmake. 2016-06-15 14:14:34 +02:00
demo Remove trailing spaces 2014-08-13 16:08:36 +02:00
docs Remove remnants of llvm configure/make build system. 2016-07-13 17:16:13 +02:00
include/cling Fix searching for library twice: DynamicLibraryManage::loadLibrary takes optional argument indicating if the path is from a previous lookupLibrary call. 2016-07-19 18:14:10 +02:00
lib Fix searching for library twice: DynamicLibraryManage::loadLibrary takes optional argument indicating if the path is from a previous lookupLibrary call. 2016-07-19 18:14:10 +02:00
patches Use markdown 2014-02-27 12:49:09 +01:00
test Try to fix test failure in Travis. 2016-07-14 14:14:15 +02:00
tools Update CPT for latest LLVM 2016-07-19 20:44:11 +02:00
www Show sidebar only in index.html. 2016-07-20 16:44:08 +02:00
.travis.yml Prevent travis from picking up wrong gcc and enable ccache. 2016-07-20 16:34:34 +02:00
CMakeLists.txt Declare dependency on tablegen-ed files. 2016-07-19 17:59:14 +02:00
CREDITS.txt Add credits. 2014-01-07 11:43:53 +01:00
LastKnownGoodLLVMSVNRevision.txt Note new llvm rev. 2016-07-12 10:44:20 +02:00
LICENSE.TXT Remove trailing spaces 2014-08-13 16:08:36 +02:00
Module.mk Fix for ROOT-8267 - ROOT 6 master fails to compile if clang present in system include paths, picks up system's clang includes! 2016-07-13 14:59:39 +02:00
README.md Add release notes for cling standalone. 2016-07-05 23:44:14 +02:00
VERSION Bump new dev version. 2016-07-06 14:01:23 +02:00

                         ______  __      ____  _   __  ______
                        / ____/ / /     /  _/ / | / / / ____/
                       / /     / /      / /  /  |/ / / / __
                      / /___  / /___  _/ /  / /|  / / /_/ /
                      \____/ /_____/ /___/ /_/ |_/  \____/

##DESCRIPTION Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure. Cling realizes the read-eval-print loop (REPL) concept, in order to leverage rapid application development. Implemented as a small extension to LLVM and Clang, the interpreter reuses their strengths such as the praised concise and expressive compiler diagnostics.

Further information & demos

Please note that some of the resources are rather old and most of the stated limitations are outdated.

##INSTALLATION ###Release Notes See our release notes to find what's new. ###Binaries We offer binary snapshots for download at https://root.cern.ch/download/cling/

###Source CLING source depends on the LLVM and CLANG headers and libraries. You will also need CMake >= 2.6.1 or GNU Make to build all of those packages and subversion and git to get the source code.

####Building Building LLVM and CLANG you must:

  • Check out the sources:
    git clone http://root.cern.ch/git/llvm.git src
    cd src
    git checkout cling-patches
    cd tools
    git clone http://root.cern.ch/git/cling.git
    git clone http://root.cern.ch/git/clang.git
    cd clang
    git checkout cling-patches
  • Configure, build and install them, either using CMake:
    cd ../../../
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=/some/install/dir \
          -DLLVM_TARGETS_TO_BUILD=host \
          -DCMAKE_BUILD_TYPE=Debug \
          ../src
    make
    make install
  • or GNU Make (see ../src/configure --help for all options):
    cd ../../../
    mkdir build
    cd build
    ../src/configure --prefix=/some/install/dir
    make
    make install

#####Cling Packaging Tool Cling's tree has a user-friendly, command-line utility written in Python called Cling Packaging Tool (CPT) which can build Cling from source and generate installer bundles for a wide range of platforms.

If you have Cling's source cloned locally, you can find the tool in tools/packaging directory. Alternatively, you can download the script manually, or by using wget:

wget https://raw.githubusercontent.com/root-mirror/cling/master/tools/packaging/cpt.py
chmod +x cpt.py

Full documentation of CPT can be found in tools/packaging.

##USAGE

/some/install/dir/bin/cling '#include <stdio.h>' 'printf("Hello World!\n")'`

To get started run:

/some/install/dir/bin/cling --help`

or type

/some/install/dir/bin/cling
[cling]$ .help`

Jupyter

cling comes with a Jupyter kernel. After building cling, install Jupyter and run jupyter kernelspec install cling. It requires a fairly new Jupyter. Make sure cling is in your PATH when you start jupyter!

See also the tools/Jupyter/kernel subdirectory.

##DEVELOPERS' CORNER We have doxygen documentation of cling's code at: http://cling.web.cern.ch/cling/doxygen/

###CONTRIBUTIONS Every contribution is very welcome. It is considered as a donation and its copyright and any other related rights become exclusive ownership of the person who merged the code or in any other case the main developers. In order for a contribution to be accepted it has to obey the previously established rules for contribution acceptance in cling's work flow and rules.