[ROOT] STL in the class

From: Jedong Lee (jdlee@fnal.gov)
Date: Thu Jul 17 2003 - 23:25:03 MEST


Hello,

I am working on v3_05_04e, with KCC4.0.
And I'm having a problem with STL vector.

This is what I get from CINT with the source listed below:

root [0] .L vec.C++
Info in <TUnixSystem::ACLiC>: creating shared library /mnt/autofs/misc/b0urpc19.a/jdlee/work/root_test/vector/./vec_C.so
"/mnt/autofs/misc/b0urpc19.a/jdlee/work/root_test/vector/./fileonmdDl.h", line 44: error #864:
          allocator is not a template
  typedef vector<double,allocator<double> > G__vectorlEdoublecOallocatorlEdoublegRsPgR;
                        ^

1 error detected in the compilation of "/mnt/autofs/misc/b0urpc19.a/jdlee/work/root_test/vector/./fileonmdDl.cxx".
KCC: Compilation failed.


Is something wrong in my code?

Best,
Jedong


--------------------------------------------------------------------
- file vec.h
--------------------------------------------------------------------
#include <vector.h>
#include "TObject.h"

class vec : public TObject
{
public:
  vec();
  ~vec();

  vector<double> v_;

  ClassDef(vec,1)
};

--------------------------------------------------------------------
- file vec.C
--------------------------------------------------------------------
#include "vec.h"
#include <vector.h>

#ifndef __CINT__
ClassImp(vec)
#endif

vec::vec(){
  v_.push_back(10);
}

vec::~vec(){}

--------------------------------------------------------------------
- file vec_linkdef.h
--------------------------------------------------------------------
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class vector<double>;
#pragma link C++ class vec;

#endif

--------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET