Loading gsl libraries

I have the following script:

{
TString libs = gSystem->GetLinkedLibs();
libs.Append(" -lgsl -lgslcblas");
gSystem->SetLinkedLibs(libs.Data());
gROOT->ProcessLine(".L spec.c+");
gROOT->ProcessLine(“spec()”);
}

and I get the following error:

/home/gamma/root/bin/root.exe: relocation error: /home/gamma/data/smallpet/./spec_c.so: undefined symbol: gsl_fft_real_wavetable_alloc

Somehow, the libraries failed to load. I also tried loading the libraries the following way:

gSystem->Load("/usr/local/lib/lib/libgsl.so");
gSystem->Load("/usr/local/lib/lib/libgslcblas.so");

and got the errors

Error in TUnixSystem::DynamicPathName: /usr/local/lib/lib/libgsl.so does not exist in .:/home/gamma/root/lib:/home/gamma/root/lib
Error in TUnixSystem::DynamicPathName: /usr/local/lib/lib/libgslcblas.so does not exist in .:/home/gamma/root/lib:/home/gamma/root/lib

This doesn’t make sense to me. Is it trying to find the gsl libraries within the root libraries?

Hi,

I am guess that you did not mean:

but meants

In which case you should also do

Cheers,
Philippe.