Re: new classes

From: Mario Kadastik <>
Date: Sun, 2 Jul 2006 12:45:27 +0300

> 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.cxx
> ld `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

ok I now cluttered all my classes into one file called particles.cpp and particles.h and used ACLiC which produced That works just nicely and I can do all I wanted just fine hence great thanks to you (couldn't use the gcc commands you sent me as I had 3 classes in that file and couldn't quite figure out how to modify Linkdef.h file to incorporate all the classes, but ACLiC at least did the job).

However I do have one more question. Is there some way I could tell ACLiC what the final library name should be? Like I'd like it to be so that I can add this library to also other codes and use it in compilation with -lMyParticles. I did try the easy way of renaming the library and it worked in compilation, but if I then do ldd <binary> then it searches for so the trick doesn't work fully :P

Thanks in advance,

Mario Kadastik
CMS experiment

"Physics is like sex, sure it may give some practical results, but that's not why we do it"

Received on Sun Jul 02 2006 - 11:45:40 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET