Re: Using Minuit Standalone

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Tue, 12 Jul 2011 09:13:14 +0000


Hi Hermann

 You need to add the libMinuit to the list of linked library since libMinuit is not part of the libraries obtained with root-config --libs

Do:

g++ `root-config --cflags --glibs` -lMinuit tosend.cpp

Best Regards

 Lorenzo
On Jul 12, 2011, at 9:48 AM, Hermann Fuchs wrote:

> Hello
>
> I am trying to use TMinuit.
>
> My program should be able to run standalone. Previously I could compile
> Root programs using the compiler options
> g++ `root-config --cflags --glibs` myfile.cpp
> This doesn't seem to work when using the TMinuit package.
> The following compiler error occurs:
>
> g++ `root-config --cflags --glibs` tosend.cpp
> /tmp/ccow2U4o.o: In function tosend()':
> tosend.cpp:(.text+0x6bd): undefined reference to `TMinuit::TMinuit(int)'
> collect2: ld returned 1 exit status
>
> Using ROOT the program works like a charm.
> Attached you will find my source file. (Yes I know, there is no main
> function, simple rename the function tosend to main).
> Which libraries do I have to include in order to get it running?
>
> Cheers,
> Hermann
> --
> -------------
> DI Hermann Fuchs
> Div. Medical Radiation Physics
> Department of Radiotherapy
> Med. Univ. Vienna / AKH Vienna
> Währinger Gürtel 18-20
> A-1090 Wien
>
> Tel. + 43 / 1 / 40 400 7271
> Mail. hermann.fuchs_at_meduniwien.ac.at
> <tosend.cpp>
Received on Tue Jul 12 2011 - 11:13:29 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 12 2011 - 11:50:01 CEST