Hi Mario,
have a look at the Makefile in test, where libEvent is build from Event.cxx and the dictionary generated on Event.h. You'll need
gcc `root-config --cflags` -c MyClass.cxx rootcint -f MyClassDict.cxx -c -p MyClass.h MyClassLinkdef.h gcc `root-config --cflags` -c MyClassDict.cxxld `root-config --ldflags` `root-config --glibs` MyClass.o MyClassDict.o -o test
MyClassLinkdef.h contains
#ifdef __CINT__
#pragma link off all globals; #pragma link off all classes; #pragma link off all functions;
#pragma link C++ class TMyClass;
#endif
There's no contradiction between a script and a set of command line parameters: you can always call
root -l -b -q "MySteeringScript.C(\"whats the question\",42)"
where MySteeringScript.C contains e.g.
void MySteeringScript(const char sentence, int number) { if (gSystem->CompileMacro("MyClass.C")) gSystem->ProcessLine(Form("myfunc(\"%s\", %d);", sentence, number); }
That way you don't have to write a build system, but can immediately work on code. The build system you're going to come up with is most probably not the one used when your code goes into production - it's just for prototyping.
> Also what do I have to do to be able to just add #include "MyEvent.h" > and then just use the object in any code segment? What kind of > compilation does that have to be? Is ACLiC compiled .so file enough (if > it's in LD_LIBRARY_PATH) or do I have to do something else?
The .so file will be enough. Again, in ACLiC you don't have to care, you just load the lib before you use it.
Cheers, Axel.
> On Jul 1, 2006, at 2:47 AM, Axel Naumann wrote: > >
> > -------------------------------- > > Mario Kadastik > > CMS experiment > > mario.kadastik_at_cern.ch <mailto:mario.kadastik_at_cern.ch> > > > "Physics is like sex, sure it may give some practical results, but > that's not why we do it" > > --- Richard P. Feynman > > >Received on Sat Jul 01 2006 - 21:29:47 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET