IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Cling is built on the top of LLVM and Clang libraries. In addition to standard interpreters it has a command line prompt and uses just-in-time (JIT) compiler. This kind of software application is commonly known as an interactive compiler.
One use case of cling is to aid the C++ learning process. Offering imediate feedback the user can easily get familiar with the structures and spelling of the language.
</p>
</li>
<li>Creating scripts
<p>
The power of an interpreter lays as well in the compactness and ease of repeatedly running a small snippet of code - aka a script. This can be done in cling by inserting the bash-like style line:
Cling can be used successfully for Rapid Application Development allowing for prototyping and proofs of concept taking advantage of dynamicity and feedback during the implementation process.
To embed Cling, the main program has to be provided. One of the things this main program has to do is initialize the Cling interpreter. There are optional calls to pass command line arguments to Cling. Afterwards, you can call the interpreter from any anywhere within the application.
For compilation and linkage the application needs the path to the clang and llvm libraries and the invocation is order dependent since the linker cannot do backward searches.
Embedding cling requires the creation of the interpreter. Optionally compiler arguments and the resource directory of llvm can be passed. An example is the following:
<p>A more complete example could be found in <ahref="https://github.com/root-project/cling/tree/master/tools/demo"target="_blank">tools/demo/cling-demo.cpp</a></p>
We are developing Cling according to the principle of Release early and release often. Binaries are available for <ahref="https://root.cern.ch/download/cling/"target="_blank">download</a>.
<p> Support is provided through a fast-response <ahref="https://root.cern.ch/phpBB3/viewforum.php?f=21"target="_blank">forum</a>, where questions of all levels are welcomed. Queries can also be sent to our mailing list: cling-dev@cern.ch.