Hello, As I tried this with pure cint, it works all fine. Is there anything special in ROOT here? Thank you Masaharu Goto >Date: Thu, 10 Aug 2000 07:58:35 +0000 >From: Rene Brun <Rene.Brun@cern.ch> >To: MXJ02154@nifty.ne.jp, pcanal@fnal.gov >Subject: [Fwd: [ROOT] stl members] > >Masa, Philippe, >This was the original mail from Matevz Tadel. > >Rene >----------------------------------------------------------------------------- - -- >Date: Tue, 8 Aug 2000 15:21:26 +0200 (CEST) >From: Matevz Tadel <Matevz.Tadel@ijs.si> >To: roottalk@pcroot.cern.ch >Subject: [ROOT] stl members > >Hi, > >I have a stl-container member in a class: >x.h <<END >#ifndef _x_h_ >#define _x_h_ > >#include <TObject.h> >#include <vector> > >class x : public TObject{ >public: > vector<int> mV; > > ClassDef(x,1) >}; > >#endif >END > >x.cxx <<END >#include "x.h" >ClassImp(x) >END > >doing the rootcint, compile and link routine ... >excrept from makefile <<END >all: dict lib > >%.o: %.cxx > ${CXX} ${CPPFLAGS} -c -o $@ ${CXXFLAGS} $< > >${DICT}.cxx: ${DHDRS} > @echo "Generating dictionary ..." > @rootcint -f ${DICT}.cxx -c ${DHDRS} > >dict: ${DICT}.cxx > >lib: ${DOBJS} > ${LD} -shared -o ${OUTLIB} ${DOBJS} ${ROOTLIBS} >END > >root session: >root [0] #include <vector> >root [1] gSystem->Load("xdict.so") >root [2] x y >root [3] y.mV.push_back(3) >Error: Can't call vector<int,__malloc_alloc_template<0> >::push_back(3) in >current scope FILE:/tmp/fileIZc85C_cint LINE:1 >Possible candidates are... >filename line:size busy function type and name (in >vector<int,__malloc_alloc_template<0> >) >*** Interpreter error recovered *** > >shouldn't this work? > >thanks ... >cheers, >matevz > >-- >--------------------------------------------------- > Matevz Tadel, E-mail: Matevz.Tadel@ijs.si > Department of Experimental High Energy Physics F9 > Jozef Stefan Institute, Jamova 39, P.o.Box 3000 > SI-1001 Ljubljana, Slovenia > Tel.: +386-61-177-3674 Fax: +386-61-125-7074 >--------------------------------------------------- > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET