Macro and CPPUNIT


I have developped a method (developped in C++) which take in parameter a Macro. The prototype of this method is the following:
void MyCalcul(Double_t a, Double_t b, void * fcn)
where fcn is a Macro (function written en C++ interpreted)

I have compiled this method and I use it as following (command written in root console):
gROOT->loadMacro(“Macrofile.C”); //Macrofile.C containt a function named toto

Now I would like to write a Unit Test in C++ with CPPUNIT library to test automatically the method.
For that, in the unit test, I need to charge a macro fuction contained in a file and to pass it in parameter of the method I would like to test. Then I wrote these lines in my C++ file:

The problem is that I cannot compile this unit test. The compiler doesn’t understand that toto is a Macro and I ontain this compilation errsor mesage : toto is not defined

My question: How I can load a macro function (C++ interpreted ) in a C++ program?
Somebody have a idea to solve my problem?



Search for “ERTTI” and “G__isinterpretedp2f” in the reference manual for cint/makecint and good luck!
(See also the very last paragraph in the but only if you survive my first above advice.)