problem with STL vector

From: Feverati <feverati_at_lapp.in2p3.fr>
Date: Fri, 9 Mar 2012 10:29:59 +0100


Dear experts,

the following code produces an error in my root 5.30/06

{

   #include <vector>
   using namespace std;

   struct COPPIE{

     int c1;
     int c2;
     double d12;

   };

   vector <struct COPPIE> qqq;
}

It seems that the error is related to the inhability to create a vector of my structure. In C++ the code works fine. How can I manage to get it working in root? The error message follows.
Thank you,

Giovanni

Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/memory:37:
Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/memory:38:
Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/memory:43:
Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/memory:44:
Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/memory:45:
Error: class,struct,union or type structCOPPIE not defined
/usr/lib64/root/cint/cint/lib/prec_stl/vector:51:
Error: Function structCOPPIE() is not defined in current scope
/usr/lib64/root/cint/cint/lib/prec_stl/vector:444:
Error: Function structCOPPIE() is not defined in current scope
/usr/lib64/root/cint/cint/lib/prec_stl/vector:444:
Error: Syntax error /usr/lib64/root/cint/cint/lib/prec_stl/vector:524: Error: void type variable can not be declared
/usr/lib64/root/cint/cint/lib/prec_stl/vector:524:
Warning: Error occurred during reading source files Note: Link requested for undefined class vector<structCOPPIE,allocator<structCOPPIE> >::value_type (ignore this message) :0:
Warning: Error occurred during dictionary source generation !!!Removing
/home1/feverati/PROTEINE/programmi/AutoDict_vector_structCOPPIE__cxx_ACLiC_dict.cxx
/home1/feverati/PROTEINE/programmi/AutoDict_vector_structCOPPIE__cxx_ACLiC_dict.h
!!!
Error: /usr/bin/rootcint: error loading headers... Error in <ACLiC>: Dictionary generation failed! Error: class,struct,union or type structCOPPIE not defined defalloc.h:137: *** Interpreter error recovered ***

-- 
Dr. Giovanni Feverati
Gemini team (biophysics)
Laboratoire de physique theorique
74941 Annecy-le-Vieux,France
tel: 33450091682
feverati_at_lapp.in2p3.fr
Received on Fri Mar 09 2012 - 10:30:06 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 09 2012 - 11:50:01 CET