Macro and CPPUNIT

Hi,

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
[b]myCalcul(23.4,toto);[/b]

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:
gROOT->loadMacro(“Macrofile.C”);
[b]myCalcul(23.4,toto);[/b]

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?

Thanks

Maud

Search for “ERTTI” and “G__isinterpretedp2f” in the http://root.cern.ch/svn/cint/trunk/doc/ref.txt reference manual for cint/makecint and good luck!
(See also the very last paragraph in the http://root.cern.ch/drupal/content/how-call-cernlib-routines-interpreter but only if you survive my first above advice.)