Hi,
Unfortunately I am force to use an old version of ROOT (6.02.12) which seems not to have support for R__LOAD_LIBRARY which is the trick I am using in more recent releases to load a class. What am I supposed to use in that old version?
The use case is the following as it works on newer releases:
MyClass.h
//This is MyClass.h
class MyClass {
public:
MyClass();
int GetFoo() const {return foo;}
protected:
int foo;
};
MyClass.C
//This is MyClass.C
#pragma once
#include "MyClass.h"
MyClass::MyClass():foo(0) {}
MyExample.C
// This is MyExample.C
R__LOAD_LIBRARY(MyClass.C+)
void MyExample() {
MyClass* mc = new MyClass();
cout << "Foo = " << mc->GetFoo() << endl;
}
To execute it it is enough to ‘.x MyExample.C’ on a newer ROOT. It doesn’t work on older releases.
Thanks a log for your help!
Isidro