ClassDef linking problem

I’ve generated a TSelector from a TTree, now I want to use it (without proof).

The problem is that when I try to link:

g++ -g -O2 -fPIC -Wall -pthread -m64  -I/gpfs/storage_4/users/home/proof/root/include -L/gpfs/storage_4/users/home/proof/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lProof -L/gpfs/storage_4/users/home/proof/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lGui -pthread -lm -ldl -rdynamic -o ../EnergyRecoAthena EnergyRecoAthena.o EnergyReconstructionAthena.o [...] base_selectors/NtupleSelector.o

I get

base_selectors/NtupleSelector.o: In function `NtupleSelector::IsA() const':
/users2/turra/cal/calibration/src/base_selectors/NtupleSelector.h:522: undefined reference to `NtupleSelector::Class()'
base_selectors/NtupleSelector.o:(.data.rel.ro._ZTV14NtupleSelector[vtable for NtupleSelector]+0x1d0): undefined reference to `NtupleSelector::ShowMembers(TMemberInspector&)'
base_selectors/NtupleSelector.o:(.data.rel.ro._ZTV14NtupleSelector[vtable for NtupleSelector]+0x1d8): undefined reference to `NtupleSelector::Streamer(TBuffer&)'
collect2: ld returned 1 exit status
make: *** [../EnergyRecoAthena] Error 1

line 522 is

   ClassDef(NtupleSelector,0);

the source code may be very simple as:


#include "NtupleSelector.h"

int main()
{
  NtupleSelector *data = new NtupleSelector();
}

ok, I forgot to generate dictionary… the point is: do I really need dictionaries? I’m using the same code with proof

Hi Wiso,

Yes you do need the dictionary.

Philippe.

[quote=“pcanal”]Hi Wiso,

Yes you do need the dictionary.

Philippe.[/quote]

why not? If I dont’ generate it with rootcint I don’t have the implentation of ShowMembers and others and the linker can’t work.

[quote=“wiso”][quote=“pcanal”]Hi Wiso,

Yes you do need the dictionary.

Philippe.[/quote]

why not? If I dont’ generate it with rootcint I don’t have the implentation of ShowMembers and others and the linker can’t work.[/quote]

sorry… I read you don’t need… how to delete post?