Re: ?: global function visible to ROOT's CINT

Masaharu Goto (gotom@hpyiddq.jpn.hp.com)
Wed, 04 Mar 1998 15:28:51 JST


Dirk,

Use '#pragma link C++ function xxx;'

> #pragma link C++ global gPoly;
^^^^^^
#pragma link C++ function gPoly;

Masaharu Goto

> I want to prepare some global functions and constants
> which should be visible in ROOT. I found an example
> for the constants, but with the functions it seems different.
>
> Here what I tried:
>
> float gPoly(float tArg ,float* p, int tOrder); // now a function
>
> and in LinkDef.h using pragmas as described
>
> #ifdef __CINT__
> #pragma link off all globals;
> #pragma link off all classes;
> #pragma link off all functions;
> #pragma link C++ class DGlobalTools;
> #pragma link C++ global gPI;
> #pragma link C++ global gPoly;
> #endif
>
> The constant gPI is available in ROOT's CINT, but
> gPoly is not. I also tried
> #pragma link C++ function gPoly;
> which makes no difference.
>
> What should I do to have gPoly() visible?