C++ flavour Notebook magics not compiling

Hi, I am testing C++ flavour notebook, following
https://root.cern.ch/notebooks/HowTos/HowTo_ROOT-Notebooks.html#cpp

However, I am not able to compile with Aclic magics and the ROOT C++ Kernel. I get the following error with the default example:

.cpp -a
class CompileMe2 {
public:
    CompileMe2() {}
    void run() {}
};
input_line_32:2:2: error: expected expression
 .cpp -a
 ^
 
 .cpp -d
void f2() {
    cout << "This is function f" << endl;
}
input_line_35:2:2: error: expected expression
 .cpp -d
 ^

Am I missing something? Any header declaration?

Hi,

thanks for trying out the ROOT kernel!
You are using the master or a 6.07 development release aren’t you? There was a major upgrade of the Jupyter integration between 6.06 and 6.07. Among the many changes, the ROOT Kernel was introduced which is based on metakernel (root.cern.ch/doc/master/release … ntegration)
The correct syntax will be for 6.07 onwards:

%%cpp -a

like a “standard magic”.
It is our objective to move all the documentation to the new syntax before the release of 6.08.

Cheers,
Danilo

Yes, I am on branch master (6.07/03).

With the corrected syntax it works smoothly. Thanks for the fast reply.