Re: [ROOT] TFitter / TMinuit Constructor problem

From: Jochen Cammin (cammin@fnal.gov)
Date: Tue Nov 02 2004 - 18:02:11 MET


Hi Jiri,

I tested it on a D0 Fedora mchine (with setup D0RunII t04.04.00)
You need to add the flag -lMinuit in your makefile. Then it will 
work. libMinuit.so might be in your path with the -L option, but it 
is not included in the list you get from root-config --libs.

Regards,
   Jochen


Jiri Kvita wrote:
> Hello!
> 
> Apologies for not specifying more, I am therefore resending my problem:
> 
> I would like to ask whether there is a problem using TFitter and TMinuit
> in a Makefile-based compiled code?
> Both g++ and KCC are complaining not to know the TFitter constructor, e.g.
> // this is fine:
>  TFitter* fitter = 0;
> // but this complains:
>  Int_t Npar=5;
>  TFitter* fitter = new TFitter(Npar);
> 
>  g++:
>  undefined reference to `TFitter::TFitter[in-charge](int)'
>  KCC:
>  undefined reference to `TFitter::__ct(int)'
> 
> (similar feature occurs when trying to allocate TMinuit, but I suppose I 
> can use gMinuit when TFitter is initialized)
> 
> I checked I have libMinuit.so in my path in -L option.
> I have tried both ROOT 3.05 and 4.00.
> 
> I am attaching a compressed tar which contains all sources and Makefile.
> My system is Fedora II, I use root-config --cflags and
> root-config --libs.
> main() is in Response_draw.cpp, problem occurs in fitResponse.cpp.
> Thank you very much for any help,
> 
>                         jiri kvita
> 
> 
> 
> ----------------------------------------------------------------------
>     Jiri Kvita, jiri.kvita@cern.ch, kvita@fnal.gov, qitek@matfyz.cz  
>                           http://qitek.matfyz.cz
>    Charles University, Prague, Faculty of Mathematics and Physics  
>  	      Institute of Particle and Nuclear Physics
>       FyzWeb - pages on physics! (in Czech) http://fyzweb.cuni.cz
> -----------------------------------------------------------------------
> 
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET