undefined reference to `ROOT::Math::sph_legendre(unsigned int, unsigned int, double)'

From: Antonio Augusto Alves Jr <aalvesju_at_cern.ch>
Date: Wed, 28 Mar 2012 12:04:49 +0200


Dear Rooters,

I am trying compile this small peace of code,

#ifndef PRIVATEMATH_H
#define PRIVATEMATH_H

#include <TROOT.h>
#include "TMath.h"
#include "Math/IFunction.h"
#include "Math/SpecFuncMathMore.h"
#include <math.h>

    using namespace ROOT::Math;
    using namespace std;

    double m_P( unsigned l, double cos_theta){

         double theta = acos( cos_theta );
         return sqrt(2*TMath::TwoPi())* sph_legendre( l, 0, theta  );
    }

#endif

but i got these errors:


    ROOT 5.32/00 (tags/v5-32-00_at_42375, Dec 02 2011, 12:42:25 on     linuxx8664gcc)

    CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010     Type ? for help. Commands must be C++ statements.     Enclose multiple statements between { }.     root [0] .L PrivateMath.h+
    Info in <TUnixSystem::ACLiC>: creating shared library     /home/augalves/Documentos/Dropbox/scripts/INFN/B2KPiPsi/./PrivateMath_h.so     /home/augalves/Documentos/Dropbox/scripts/INFN/B2KPiPsi/PrivateMath_h_ACLiC_dict.o:     In function `m_P(unsigned int, double)':     PrivateMath_h_ACLiC_dict.cxx:(.text+0x4cd): undefined reference to     `ROOT::Math::sph_legendre(unsigned int, unsigned int, double)'     collect2: ld returned 1 exit status
    Error in <ACLiC>: Compilation failed!     root [1]

Please can someone help me

Thanks
A.A.

-- 
E aqueles que foram vistos dançando foram julgados
insanos por aqueles que não podiam escutar a música.
Friedrich Nietzsche
Received on Wed Mar 28 2012 - 12:04:56 CEST

This archive was generated by hypermail 2.2.0 : Wed Mar 28 2012 - 17:50:01 CEST