[ROOT] preprocessing 3rd party headers with CINT

From: Justin Findlay (findlay@cosmic.utah.edu)
Date: Thu Mar 11 2004 - 10:11:03 MET


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