Code wont compile on os x, but does on slc4

Hello,

I have some c++ classes (.hh.,cc files) and one cc file which makes use of some of these. I compile this all into an executable where int main is defined in the macro.cc file. T
his seems to work on my slc4 linux box. On my ibook I get problems:

g++ -g -o DiQuarkTopMass_TopView -O TopCalcMass.o TopJetRes.o TopJetSorter.o TopTransverseMassFCN.o TopTruth.o TopBgTopRecoViewProcessor.o TopBgTopTruthViewProcessor.o DiQuarkTopMass_TopView.o -L/Users/markhodgkinson/root_v516//lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lfreetype -lpthread -lm -ldl -L/Users/markhodgkinson/root_v516//lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lfreetype -lGui -lpthread -lm -ldl
/usr/bin/ld: Undefined symbols:
TFile::Close(char const*)
TFile::TFile(char const*, char const*, char const*, int)
TFile::~TFile()
typeinfo for TEmulatedCollectionProxy

I append my Makefile below if that helps - I am a beginner with makefiles so perhaps there is something not right in there for os x? As I said everything works on slc4 so I am puzzled.

I have compiled root 5.16 from the source code with gcc 4.0.1 on os x latest.

Thanks for any help,

Mark

NAME = DiQuarkTopMass_TopView

OBJECTS = TopCalcMass.o TopJetRes.o TopJetSorter.o TopTransverseMassFCN.o TopTruth.o TopBgTopRecoViewProcessor.o TopBgTopTruthViewProcessor.o DiQuarkTopMass_TopView.o

HEADERS = TopCalcMass.hh TopJetRes.hh TopJetSorter.hh TopTransverseMassFCN.hh TopTruth.hh TopBgTopRecoViewProcessor.hh TopBgTopTruthViewProcessor.hh

Ccfiles = $(OBJECTS:.o=.cc)

ROOTLIBS = $(shell root-config --libs)

ROOTGLIBS = $(shell root-config --glibs)

CXXFLAGS = $(shell root-config --cflags)

all: $(NAME)

$(CCFILES):

$(OBJECTS): $(HEADERS)

$(NAME): $(OBJECTS)
g++ -g -o $(NAME) -O $(OBJECTS) $(ROOTLIBS) $(ROOTGLIBS)

%.o: %.cc
g++ $(CXXFLAGS) -Wall -I$(ROOTSYS)/include -c $<

clean:
\rm *.o DiQuarkMass_TopView

You must link with -lRIO too (see 5.16 release notes)

Rene

[quote=“brun”]You must link with -lRIO too (see 5.16 release notes)

Rene[/quote]

Thanks this solves my problem!

Cheers,

Mark