Cling - The Interactive C++ Interpreter
The main repository is at https://github.com/root-project/cling
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.
See also cling's web page.
Please note that some of the resources are rather old and most of the stated limitations are outdated.
See our release notes to find what's new.
Our nightly binary snapshots can be found here.
Building from Source with 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. CPT requires Python 2.7 or later.
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 https://raw.githubusercontent.com/root-project/cling/master/tools/packaging/cpt.py chmod +x cpt.py ./cpt.py --check-requirements && ./cpt.py --create-dev-env Debug --with-workdir=./cling-build/
Full documentation of CPT can be found in tools/packaging.
./cling '#include <stdio.h>' 'printf("Hello World!\n")'
To get started run:
./cling [cling]$ .help
Every contribution is considered 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 of the "Cling Project".
We warmly welcome external contributions to the Cling! By providing code, you agree to transfer your copyright on the code to the "Cling project". Of course you will be duly credited and your name will appear on the contributors page, the release notes, and in the CREDITS file shipped with every binary and source distribution. The copyright transfer is necessary for us to be able to effectively defend the project in case of litigation.
Please see our LICENSE.
Our release steps to follow when cutting a new release:
- Update release notes
~devsuffix from VERSION
- Add a new entry in the news section of our website
- Commit the changes.
git tag -a v0.x -m "Tagging release v0.x"
- Create a draft release in github and copy the contents of the release notes.
- Wait for green builds.
- Upload binaries to github (Travis should do this automatically).
- Publish the tag and announce it on the mailing list.
- Increment the current version and append