Silly workaround for rootcling not being able to parse the STL headers anymore after the update of Visual Studio to the version 16.7.0: ``` Generating G__Core.cxx, ../bin/libCore.rootmap In file included from input_line_5:1: In file included from C:/Users/sftnight/build/release/include\Rtypes.h:191: In file included from C:/Users/sftnight/build/release/include/TGenericClassInfo.h:21: In file included from C:/Users/sftnight/build/release/include/TSchemaHelper.h:17: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291 10\\include\string:11: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291 10\\include\xstring:14: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291 10\\include\xmemory:16: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.291 10\\include\xutility:15: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error G08EB1F86: expected member name or ';' after declaration specifiers [C:\Users\sftnight\build\release\core\G__Core.vcxproj] !_Is_implicitly_default_constructible<_Uty1>::value || !_Is_implicitly_default_constructible<_Uty2>::value) ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(137,9): error GC66A3811: expected ')' [C:\Users\sftnight\build\release\core\G__Core.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility:136:23: note: to match this '(' constexpr explicit( ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error G08EB1F86: expected member name or ';' after declaration specifiers [C:\Users\sftnight\build\release\core\G__Core.vcxproj] constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>) ~~~~~~~~~~~~~~~~~~ ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility(218,24): error GC66A3811: expected ')' [C:\Users\sftnight\build\release\core\G__Core.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\utility:218:23: note: to match this '(' constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>) ^ In file included from input_line_5:1: In file included from C:/Users/sftnight/build/release/include\Rtypes.h:191: In file included from C:/Users/sftnight/build/release/include/TGenericClassInfo.h:21: In file included from C:/Users/sftnight/build/release/include/TSchemaHelper.h:17: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\string:11: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xstring:14: In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xmemory:16: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xutility(63,31): error G959205E0: '_To' does not refer to a value [C:\Users\sftnight\build\release\core\G__Core.vcxproj] return __builtin_bit_cast(_To, _Val); ^ C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\\include\xutility:51:17: note: declared here template <class _To, class _From, ^ CUSTOMBUILD : error : Error loading the default header files. [C:\Users\sftnight\build\release\core\G__Core.vcxproj] ``` To be checked/removed after the upgrade of LLVM & Clang
Cling - The Interactive C++ Interpreter
The main repository is at https://github.com/root-project/cling
Overview
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.
- talks
- http://blog.coldflake.com/posts/2012-08-09-On-the-fly-C++.html
- http://solarianprogrammer.com/2012/08/14/cling-cpp-11-interpreter/
- https://www.youtube.com/watch?v=f9Xfh8pv3Fs
- https://www.youtube.com/watch?v=BrjV1ZgYbbA
- https://www.youtube.com/watch?v=wZZdDhf2wDw
- https://www.youtube.com/watch?v=eoIuqLNvzFs
Installation
Release Notes
See our release notes to find what's new.
Binaries
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
:
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.
Usage
./cling '#include <stdio.h>' 'printf("Hello World!\n")'
To get started run:
./cling --help
or type
./cling
[cling]$ .help
Jupyter
Cling comes with a Jupyter kernel. After building cling, install Jupyter and cling's kernel by following the README.md in tools/Jupyter. Make sure cling is in your PATH when you start jupyter!
Citing Cling
% Peer-Reviewed Publication
%
% 19th International Conference on Computing in High Energy and Nuclear Physics (CHEP)
% 21-25 May, 2012, New York, USA
%
@inproceedings{Cling,
author = {Vassilev,V. and Canal,Ph. and Naumann,A. and Moneta,L. and Russo,P.},
title = {{Cling} -- The New Interactive Interpreter for {ROOT} 6}},
journal = {Journal of Physics: Conference Series},
year = 2012,
month = {dec},
volume = {396},
number = {5},
pages = {052071},
doi = {10.1088/1742-6596/396/5/052071},
url = {https://iopscience.iop.org/article/10.1088/1742-6596/396/5/052071/pdf},
publisher = {{IOP} Publishing}
}
Developers' Corner
Cling's latest doxygen documentation
Contributions
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.
License
Please see our LICENSE.
Releases
Our release steps to follow when cutting a new release:
- Update release notes
- Remove
~dev
suffix 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
~dev
.