Re: How to compile Math libraries

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 04 Sep 2006 19:03:14 +0200


Hi PierPaolo,

This function is in libMathCore that is not part of the default library set. You should link with:

g++ -g -O -o mycode mycode.o `root-config --libs` -lMathCore

Rene Brun

Pierpaolo Righini wrote:
> Hi Rene,
> I tried but unsuccesfully to follow your suggestion for compiling the
> Math libraries, for example to use
> "gaussian_quant" here are a very simple code:
>
>
> #include "TROOT.h"
> #include "Math/ProbFuncMathCore.h"
> using namespace ROOT::Math;
> int main(int argc, char **argv){
> TROOT root("Call center","analysis");
> double f=gaussian_quant(0.1,1.);
> return(0);
> }
>
> that I try to compile with:
> g++ -g -I$ROOTSYS/include -c mycode.cpp
> g++ -g -O -o mycode mycode.o `root-config --libs`
>
> but I get the following error when trying to link it:
>
> undefined reference to `ROOT::Math::gaussian_quant(double, double,
> double)'
>
> Could you tell me where is the mistake?
>
> Many thanks
>
> Pierpaolo
>
Received on Mon Sep 04 2006 - 19:03:18 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET