Cint and stl classes (sorry, again)

Hi everyone,

Sorry, I know this topic has been raised quite often already but I’m confused.

First of all, I’m running the ROOT v5.12/00 binary for Mac OS X (PPC) with gcc 4.0.1.

The problem is the following: from the cint command line ‘vector’ works but ‘vector’ does not. More specifically:

  •                                     *
  •    W E L C O M E  to  R O O T       *
  •                                     *
  • Version 5.12/00 10 July 2006 *
  •                                     *
  • You are welcome to visit our Web site *
  •      [](            *
  •                                     *

FreeType Engine v2.1.9 used to render TrueType fonts.
Compiled on 11 July 2006 for macosx with thread support.

CINT/ROOT C/C++ Interpreter version 5.16.13, June 8, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
rroot [0] vector a
root [1] a
(class vector)49092736
root [2] a.resize(4)
root [3] vector b
root [4] b
(class vector)49097728
root [5] b.resize(4)
Error: Can’t call vector<int,allocator >::resize(4) in current scope (tmpfile):1:
Possible candidates are…
(in vector<int,allocator >)
*** Interpreter error recovered ***
root [6]

Trying vector<Int_t> does not help, typing ‘b.’ and hitting tab tells me ‘Warning in : no dictionary for class vector is available’.

So I’m confused about a few things:

  • how come it allows me to instantiate b, if it does not know of such a thing?
  • what exactly is built by ‘gmake cintdlls’ (which I guess has been part of the binary build)?
  • Where does the information for the cintdlls come from? I downloaded the 5.12/00 source and grepped through all linkdef files. I can find vector in ./base/inc/LinkDef2.h with the familiar syntax:
    #pragma link C++ class vector;
    But I can only find vector in ./metautils/src/vectorLinkdef.h (where the name metautils makes me wonder if I’m not looking in the wrong place) as
    #pragma create TClass vector;
    Who can tell me what that does?

Anyway, sorry for the rather long post but I wanted to show that I did dig and tried to find the solution. But I’m stuck.

Thanks for your help,

P.S. I did find this … 7e15c78ab7
thread but I’m already running the mentioned binary and Axel’s little test fails for me.

This problem has been fixed in recent version of ROOT.
To work around the problem you need to compile (via ACLiC) your scripts.