Hi,
I continued to read the article about the dictionary part, and was able to compile my program properly once I used rootcint to create the dictionary part.
Thanks,
Emanuel
Emanuel Machado, PhD.
Senior Engineer, Project Leader
Cytonome, Inc.
27 Drydock Ave
Boston, MA 02210
Voice: (617) 330-5030 ext. 237
Fax: (617) 330-5031
Website: www.cytonome.com
Email: Emanuel-Machado_at_cytonome.com
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On
Behalf Of Emanuel Machado
Sent: Monday, June 16, 2008 11:31 AM
To: 'roottalk'
Subject: [ROOT] Confused on adding a class to root
Hello,
I am having trouble getting the ClassDef and ClassImp macros to work as I try to add a class to root. I'm compiling code using the libraries, on root 5.19/04 which I recently upgraded from 5.12. My system is running Fedora Core 5, and generally I have had no problems compiling/running code.
This, however, is the first time I attempt to add a class to root. In a way, since I run compiled code, I wonder if I have to in order to derive from TObject and pass objects through the TSocket mechanism, but this is my current understanding of it. Prequestion: are the macros only meant to be used while under a root session/CINT?
So I attempted to follow the instructions in http://root.cern.ch/root/Using.html ("Adding Your Own Classes to Root"), and examined the TLine example, so I added ClassDef to the class definition and ClassImp to the class implementation files.
What I notice is that if I comment those statements, I get a good compilation (note that I'm not yet at the point of actually using this), but if I don't, I get linking errors pointing to some undefined references that I would have assumed should have been dealt with by the macros.
I include the combined files as an attachment (text and files if you want to try to reproduce this)
Thanks in advance for your comments,
Emanuel
Emanuel Machado, PhD.
Senior Engineer, Project Leader
Cytonome, Inc.
27 Drydock Ave
Boston, MA 02210
Voice: (617) 330-5030 ext. 237
Fax: (617) 330-5031
Website: www.cytonome.com
Email: Emanuel-Machado_at_cytonome.com
This archive was generated by hypermail 2.2.0 : Tue Jun 17 2008 - 11:50:02 CEST