I’m new to CINT and want to find out whether I understand its possibilities correctly.
I want to upgrade from Tiny C Compiler to CINT, from C to C++, but didn’t find in CINT appropriate APIs for next things.
It is indeed possible/easy to do this in CINT (but in order to mix compiled and interpreted code you would need to generate dictionary at compile time).
I recommend that you give Cling a try (CINT’s successor based on llvm and clang).
[code]
int main( int argc, char **argv ) {
{
A a;
// Set up the interpreter
cling::Interpreter interp(argc, argv);
if (interp.getOptions().Help) {
return 0;
}
interp.loadFile(“header.h”)
stringstream ss;
ss << “A a1 = (A)” << (void*)&a << “;\n”;
ss << “a1->Func(123);\n”;
interp.process(ss.str().c_str());
I had tried llvm approach earlier. But I had failed to make it as lightweight as possible: I want to use CINT as scripting engine for game development to compile code on the fly in memory.
Where can I read about dictionaru creation and external linkage? Are there any application project examples with similar scenario?