RE: [ROOT] ACLiC and templates

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Mar 18 2002 - 16:59:59 MET


Hi Jacek,

As of ROOT 3.03.02, ACLiC can be given extra instruction using the content
of a file named 'MyMacro_linkdef.h' (the _linkdef suffix is customizable).

In this file you can enter any kind of #pragma request and they will
be honored.

In you case you would need:

// MyMacro_linkdef.h
#pragma link C++ class MyTemplate<MyClass1>+;
#pragma link C++ class MyTemplate<MyClass2>+;

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Jacek M. Holeczek
Sent: Sunday, March 17, 2002 3:09 PM
To: RootTalk
Subject: [ROOT] ACLiC and templates


I have the following C++ macro :
----------------------------
#if !defined (__CINT__) && !defined (__MAKECINT__)
#include "AllMyClassSources.cxx" // full source code for MyClass1 and MyClass2
#endif /* !defined (__CINT__) && !defined (__MAKECINT__) */

#include "MyMyTemplate.hxx" // full source code for MyTemplate<class T>

class MyClass1;
class MyClass2;

template MyTemplate<MyClass1>;
template MyTemplate<MyClass2>;
----------------------------
But when I try "gROOT->LoadMacro("./MyMacro.cxx+");" there are no
warnings, no errors, the shared library is created (and inside of it I can
see my templates instantiated), but ACLiC's rootcint does NOT create
dictionary, so I cannot use these templates interactively ...
Is there any magic line in the source code that could convince ACLiC ... ?
Best regards,
Jacek.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:46 MET