Re: Can't use STL in root?

From: Masaharu Goto (gotom@hpyiddq.jpn.hp.com)
Date: Tue May 19 1998 - 05:56:38 MEST


Stefan,

You need special STL header file sets for cint  which is not included in
ROOT package now.  Copy cint source package and unpack it. There is
$CINTSYSDIR/stl directory. Copy that directory as $ROOTSYS/cint/stl.
Then, simply do 'root[0] #include <vector>'. Don't use absolute path.

With above setting, you can use some feature of STL. But not all. You 
can use array, <vector> and <string> but they are not fast. <list> may 
work to some extent but very slow. <deque>, <map>, <multimap> do not
work yet.  Please do not expect too much here. 

Right now, cint interprets all STL templates. It is nicer if we have 
precompiled sets of STL containers.

Masaharu Goto


> I am playing (again) with root. I would like to use some of my code with
> root, which uses STL containers like <vector>. For a start, I tried this:
> 
> on OSF1 online04.lbl.gov V4.0 386 alpha:
> 
>   *******************************************
>   *                                         *
>   *        W E L C O M E  to  R O O T       *
>   *                                         *
>   *   Version   2.00/06       15 May 1998   *
>   *                                         *
>   *  You are welcome to visit our Web site  *
>   *          http://root.cern.ch            *
>   *                                         *
>   *******************************************
> 
> CINT/ROOT C/C++ Interpreter version 5.13.54, May 15 1998
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] #include "/usr/include/cxx/vector"
> Limitation: can not handle macro _TYPENAME typename Use +P or -p option
>  FILE:/usr/include/cxx/stdcomp LINE:1499
> 
> Does this mean I can't use STL containers? Or is there a way around this
> "limitation"?
> 
> cheers, Stefan
> 
> ---Stefan Kluth---------------Lynen Fellow----------------|\--|\-------
> -  LBNL, MS 50A 2160       -  phone:  +1 510 495 2376  -  |/  |/      -
> -  1 Cyclotron Rd.         -  fax:    +1 510 495 2957  -  |\/\|\/\|'  -
> ---Berkeley, CA94720, USA-----e-mail: SKluth@lbl.gov------|/\/|/\/|----



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