Hi Rene, Yesterday evening, I found the solution of my problem. It seems to be due to the fact that I included an header file (which defines some constants) without using it or without putting it into the Makefile. I also found a mistake in my Makefile. Now, all works perfectly on RH7.2 with g++ 2.96 and root 3.03.09, but I still have a problem on Mac OS X.2, which is also a "parse error" problem. (g++ 3.1 20020420 (prerelease) and root 3.04.02) //_________________________________________________________ g++ -O -pipe -Wall -I/cern/root/include -c TSimpleParticle.cxx Generating dictionary TSimpleParticleDict.cxx... g++ -O -pipe -Wall -I/cern/root/include -c TSimpleParticleDict.cxx In file included from TSimpleParticleDict.h:29, from TSimpleParticleDict.cxx:13: TSimpleParticle.h:43: parse error before numeric constant TSimpleParticle.h:45: parse error before numeric constant TSimpleParticle.h:47: parse error before numeric constant TSimpleParticleDict.cxx: In function `int G__TSimpleParticle_TSimpleParticle_1_0(G__value*, const char*, G__param*, int)': TSimpleParticleDict.cxx:228: no matching function for call to `TSimpleParticle ::TSimpleParticle(double, double, double, bool, double, double, double, double, double, double)' TSimpleParticle.h:22: candidates are: TSimpleParticle::TSimpleParticle(const TSimpleParticle&) TSimpleParticle.h:41: TSimpleParticle::TSimpleParticle() TSimpleParticleDict.cxx: In function `int G__TSimpleParticle_TSimpleParticle_2_0(G__value*, const char*, G__param*, int)': TSimpleParticleDict.cxx:241: no matching function for call to `TSimpleParticle ::TSimpleParticle(double, double, double, bool, Double_t*, Double_t*)' TSimpleParticle.h:22: candidates are: TSimpleParticle::TSimpleParticle(const TSimpleParticle&) TSimpleParticle.h:41: TSimpleParticle::TSimpleParticle() TSimpleParticleDict.cxx: In function `int G__TSimpleParticle_TSimpleParticle_3_0(G__value*, const char*, G__param*, int)': TSimpleParticleDict.cxx:254: no matching function for call to `TSimpleParticle ::TSimpleParticle(double, double, double, bool, TVector3&, TVector3&)' TSimpleParticle.h:22: candidates are: TSimpleParticle::TSimpleParticle(const TSimpleParticle&) TSimpleParticle.h:41: TSimpleParticle::TSimpleParticle() make: *** [TSimpleParticleDict.o] Error 1 //_________________________________________________________ I'll send you my different files in another mail. Thanks again, Julien On Wed, 5 Mar 2003, Rene Brun wrote: > Hi Julien, > > Could you send me your .h and .cpp files? > > Rene Brun > > "Julien.Bolmont" wrote: > > > > Hello rooters ! > > > > I wrote a class TSimpleParticule : > > > > //_________ TSimpleParticle.h _________________________________ > > > > class TSimpleParticle : public TObject { > > > > ... > > > > ClassDef(TSimpleParticle,1) > > > > }; > > > > //____________________________________ > > > > On of TSimpleParticle constructor use TVector3 objects, so I included > > TVector3.h at the beginning of TSimpleParticle.h. > > > > I use a Makefile inspired by $ROOTSYS/test/Makefile. During compilation of > > TSimpleParticle.cpp on Red Hat 7.2 with g++ 2.96 and root 3.03.09, I get : > > > > //__________________________________________ > > > > g++ -O -Wall -fPIC -D_REENTRANT > > -I/home/masse/soft/root/v3.03.09.rh7.2/include -c -o TSimpleParticle.o > > TSimpleParticle.cpp > > In file included from > > /home/masse/soft/root/v3.03.09.rh7.2/include/TVector3.h:17, > > from TSimpleParticle.h:21, > > from TSimpleParticle.cpp:14: > > /home/masse/soft/root/v3.03.09.rh7.2/include/TMatrix.h:94: parse error > > before `1.60217733e-19' > > /home/masse/soft/root/v3.03.09.rh7.2/include/TMatrix.h:95: parse error > > before `1.60217733e-19' > > make: *** [TSimpleParticle.o] Erreur 1 > > > > //________________________________________________ > > > > I also tried to compile on Mac OS X.2.4, with g++ 3.1 20020420 > > (prerelease) and root 3.04.02. Here is the result (quiete similar !) : > > > > //________________________________________________ > > > > g++ -O -pipe -Wall -I/cern/root/include -c -o TSimpleParticle.o > > TSimpleParticle.cpp > > In file included from /cern/root/include/TVector3.h:17, > > from TSimpleParticle.h:21, > > from TSimpleParticle.cpp:14: > > /cern/root/include/TMatrix.h:96: parse error before numeric constant > > /cern/root/include/TMatrix.h:97: parse error before numeric constant > > make: *** [TSimpleParticle.o] Error 1 > > > > //________________________________________________ > > > > I didn't find anything like this in roottalk digest so I think I'm doing > > something wrong, but what is it ? > > Could you help me ? > > > > Thanks a lot, > > Julien > > > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Julien Bolmont | julien.bolmont@gamum2.in2p3.fr > > Ingénieur diplômé, doctorant | Tél. bureau: +33 4 67 14 93 30 > > Groupe d'Astroparticules de Montpellier | Tél. domicile: +33 4 67 41 43 91 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Julien Bolmont | julien.bolmont@gamum2.in2p3.fr Ingénieur diplômé, doctorant | Tél. bureau: +33 4 67 14 93 30 Groupe d'Astroparticules de Montpellier | Tél. domicile: +33 4 67 41 43 91 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET