Hi Rooters,
I am using root on a RHEL system. I obatin the following output when trying to compile an executable using the attached code and Makefile. The error seems to be in the linking phase. Can anyone help?
ifarml3.jlab.org> make
g++ -MM -Wall -I/apps/root/PRO/root/include mc_sosBaseClass.C > mc_sosBaseClass.d
g++ -MM -Wall -I/apps/root/PRO/root/include mc_sosBaseClass.C | sed s/\.o/.d/ >> mc_sosBaseClass.d
g++ -Wall -I/apps/root/PRO/root/include -c -o mc_sosBaseClass.o mc_sosBaseClass.C
g++ -L/apps/root/PRO/root/lib root-config --glibs
-o mc_hms_acceptfunc mc_sosBaseClass.o
/usr/lib/crt1.o(.text+0x18): In function _start': : undefined reference to
main’
collect2: ld returned 1 exit status
make: *** [mc_hms_acceptfunc] Error 1
Many thanks,
Mark
files.tar (40 KB)