Hello,
I am trying to write a template class. However I fail to generate
the dictionary:
-------------------------------------------------------------------
% rootcint -f TestClass_dict.C -c TestClass.h TestClass_linkdef.h
Error: Symbol int is not defined in current scope FILE:TestClass.h LINE:286
*** Interpreter error recovered ***
Error: Symbol int is not defined in current scope FILE:TestClass.h LINE:286
*** Interpreter error recovered ***
-------------------------------------------------------------------
Source files are listed:
*****************************************************
* File TestClass.h
*****************************************************
#ifndef __TestClass__
#define __TestClass__
#include "TObject.h"
template<class Type>
class TestClass : public TObject
{
public:
TestClass();
~TestClass();
private:
Type *_tree;
ClassDefT(TestClass, Type)
};
ClassDefT2(TestClass, Type)
ClassImpT(TestClass, Type)
template<class Type>
TestClass<Type>::TestClass() // Constructor
{
_tree = new Type;
}
template<class Type>
TestClass<Type>::~TestClass() // Destructor
{
delete _tree;
}
#endif
*****************************************************
* File TestClass.C
*****************************************************
#include "TestClass.h"
*****************************************************
* File TestClass_linkdef.h
*****************************************************
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TestClass<int>+;
#endif
*****************************************************
I appreciate for your help,
- Jedong
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET