Re: [ROOT] TMath

From: Otto Schaile (Otto.Schaile@Physik.uni-muenchen.de)
Date: Mon Dec 17 2001 - 09:44:22 MET


Hi Peter,

you should use the scope operator ::

 TMath::Gamma(10.)

Cheers
Otto


On Sun, 16 Dec 2001, Peter H Fisher wrote:

> Hi Rooters,
> 
> I am having some trouble:  I have
> 
> #include "TMath.h"
> 	.
> 	.
> main()
> {
> 	.
> 	.
> 	float x=Gamma(10.);
> 	.
> 	.
> }
> 
> When I compile, I get
> 
> g++ -g -I/root/include -D_REENTRANT -I/root/include -c aperature.c
> aperature.c: In function `int aperature(int, char **)':
> aperature.c:292: warning: implicit declaration of function `int
> Gamma(...)'
> g++  aperature.o   -L/root/lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad
> -lTree -lRint -lPostscript -lMatrix -lPhysics -lm -ldl -lpthread -rdynamic
> -o aperature
> aperature.o: In function `aperature(int, char **)':
> /projects/Neutrino/new/aperature.c:292: undefined reference to `Gamma'
> collect2: ld returned 1 exit status
> make: *** [aperature] Error 1
> 
> I checked to make sure TMath.h was in /root/include and it is.  Any
> suggestions?
> 
> Peter
> 
> 
> 
> Peter Fisher                                   Office 617-253-8561
> Professor of Physics                           Fax    617-253-4100
> 44-118 MIT	                               email  fisherp@mit.edu
> Cambridge, MA, 02139
> 

-- 
Otto Schaile            Sektion Physik, LMU Muenchen
Phone: +49 89 289 14070     Am Coulombwall 1, D-85748 Garching, Germany
GSM:   +49 160 1553598
FAX:   +49 89 289 14072     EMail: Otto.Schaile@Physik.Uni-Muenchen.DE



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:12 MET