EventDisp. issue

Dear all,
I have some issues with the following sample code, inside the interpreter works fine and also I am able to compile it, but when I run, it crashes at the lines where I try to set “track->fV.fX = …” Do you have any idea about the reason why?

    TEveRecTrack* track;
    TFile* ed_file;
    TTree* event_display_tree;

    ed_file = new TFile("/home/user/trial.root", "RECREATE");
    TDirectoryFile *hpx    = new TDirectoryFile("Event0001","");
    event_display_tree = new TTree("RecTracks","Reconstructed tracks");
    event_display_tree->Branch("R", "TEveRecTrack", &track, 16000, 2);

    track->fV.fX = 5;
    track->fV.fY = 4;
    track->fV.fZ = 3;        
    track->fP.fX = 0.1;
    track->fP.fY = 0.1;
    track->fP.fZ = 1;
    //track->fIndex = -1;


TEveRecTrack *track = new TEveRecTrack();

replacing that line it doesn’t compile anymore:

TEveRecTrackT]+0xe8): undefined reference to `TEveRecTrackT::ShowMembers(TMemberInspector&)’

TEveRecTrack *track = 0;

no, same issue

The “TEveRecTrack” comes from ROOT.
You are missing “-lEve” in your linking command line (or use simply “root-config --evelibs”).

Yes! thanks it works