RE: [ROOT] preprocessing 3rd party headers with CINT

From: Philippe Canal (pcanal@fnal.gov)
Date: Thu Mar 11 2004 - 16:56:06 MET


Hi Justin,

Which problem do you still see __with__ the -p option?
Can you provide an example?

Cheers,
Philippe.

PS.  Also see Masa's talk at the recent ROOT User's Workshop on the subject
of
3rd party libraries.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Justin Findlay
Sent: Thursday, March 11, 2004 3:11 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] preprocessing 3rd party headers with CINT


I'd like to use some very useful 3rd party libraries in interactive ROOT,
specifically BOOST, but I'm reluctant to try constructing wrappers for
including the headers since CINT can't preprocess them properly with or
without +P or -p.  There ought to be a more elegant solution.

#if !defined(__CINT__)
 	#include "your_recalcitrant_header.h[pp]"
#else
	// include forwarding or summary of header that is
	// needed for parsing the code.
#endif

running 'g++ -E' on the header (ignoring the errors :) and then feeding the
result to ROOT yields a dissapointing "limitation".

Limitation: Can't instantiate precompiled template ...

Perhaps it is more work than it is worth.  Are there any thoughts on how one
might go about inserting 3rd party, even templated, libraries into the ROOT
command line run time?  This would involve surmounting both the header
preprocessing and template instantiation difficulties.

Here is some previous discussion on simmilar/the same issue[s] if you're
interested.

ROOT - boost specific
http://root.cern.ch/root/roottalk/roottalk03/0876.html
http://root.cern.ch/root/roottalk/roottalk04/0283.html

CINT +P or -p
http://root.cern.ch/root/roottalk/roottalk99/0510.html
http://root.cern.ch/root/roottalk/roottalk98/1445.html
http://root.cern.ch/root/roottalk/roottalk01/1021.html
http://root.cern.ch/root/roottalk/roottalk03/1990.html
http://root.cern.ch/root/roottalk/roottalk01/0013.html
http://root.cern.ch/root/roottalk/roottalk00/2522.html


Justin

ROOT   Version   4.00/02     11 March 2004
Linux 2.6.3-gentoo-r1 i686 AMD Athlon(TM) XP 2100+ AuthenticAMD GNU/Linux
g++ (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET