Hi Jiri,
How about adding
#ifndef HAVE_ROOT
#define ClassDef(a,b)
#endif
to the beginning of your file, and not putting the "#ifdef HAVE_ROOT"
around the ClassDef() inside the class?
Cheers,
Maarten.
On Thu, 2003-10-30 at 05:09, Jiri Masik wrote:
> Hi,
>
> I have written an interface to the pdflib library. While Root is not
> necessary for its function I'd like to extend it by some features if
> Root is available on a given system. So I have the following lines
>
> class PDFSet
> #ifdef HAVE_ROOT
> : public TObject
> #endif
> {
>
> public:
> PDFSet(); //keep the currently set PDF
> PDFSet(Int_t Type, Int_t Group, Int_t Set); //set PDF
>
> ~PDFSet();
> private:
> UShort_t fType; // PDF type
> UShort_t fGroup; // PDF group
> UShort_t fSet; // PDF set
>
> #ifdef HAVE_ROOT
> ClassDef(PDFSet,1)
> #endif
> };
>
> It probably fails due to the limitation on the position of the
> ClassDef macro which has to be on the last line before };. If it is
> surrounded by #ifdef/#endif there is an unresolved reference
> PDFSet::ShowMembers(TMemberInspector&, char*) whenever I attempt to
> load the library into Root. Is there a way around this?
>
> thanks
>
> Jiri
--
Maarten Ballintijn <maartenb@mit.edu>
Massachusetts Institute of Technology
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET