rootcint'ing a C header file

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Thu Feb 11 1999 - 10:59:02 MET


Hi everybody,

I have a big C header file for which I would like to include all the
functions and structs in ROOT. I don't want to describe each function
and struct by one line in a LinkDef file because the number of functions
is going to change, as well as their names. Since there are one hundred
such functions...

So I tried to use the following linkdef :

LinkDef.h----------------------------------------------
#ifdef __CINT__

#pragma link off all globals;
#pragma link C++ all classes; // (tried also link C, same effect )
#pragma link C all functions;

#endif
-------------------------------------------------------

and the simplified header below, to show the problem :

mygr.h ------------------------------------------------
struct ld_binheader {
   float elapsed_time;
   float datarate;  };

void ratio(float *c, float *a, float *b, int ncomplex);
-------------------------------------------------------

if I do 

rootcint -f mygr_cint.cc -c mygr.h LinkDef.h

It tells me some Links are requested for ROOT specific classes : TClass,
TKey, TFile, etc... and some other std c++ : ostream, ...

well, if I try to do

g++ -g -fPIC -fno-rtti -fno-exceptions -I$ROOTSYS/include -c
mygr_cint.cc

I get a bunch of errors, mainly due to the fact that rootcint wants to
create a link with these ROOT classes. There is even a problem with
va_start.

I don't understand what I did wrong, this is all very simple.

If I do #pragma link off all classes; instead of #pragma link C++ all
classes;
I have an error which is " 'va_start' used in function with fixed args"
in mygr_cint.cc. Looking at this file, everything seems to indicate that
rootcint tries to create some links with some ROOT classes even if I
didn't ask anything.

Can anyone help me on this subject ?

Damir

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:29 MET