Problem on using GSL on root

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

I want to use wavelet filter to analyse the data,but I do not know how to use GSL through ROOT.Before that,I was simplely using “root -l test.c” on Ubuntu terminal.

So can anyone tell me how to run it on ROOT?

In GCC,it is
$ gcc –Lyour_path/lib –Iyour_path/include your_code –lgsl –lgslcblas

Before what ? … if ROOT is installed you can use it exactly that way.

regarding GSL in ROOT there is already a thread on the forum.

For example , whem running test.c ,as it is


int main(int argc,char const *argc[])

double x[5]={1.,2.,3.,4.,5.};
for(int i=0;i<5;i++)
return 0:


and it replys as

root -l test.c
root [0]
Processing test.c…
Error: cannot open file “gsl/gsl_sf.h” test.c:3:
*** Interpreter error recovered ***
root [1]

It does not work.

Rename “main(int argc,char const *argc[])” into “test(void)”, then try:

root [0] gSystem->Load("/usr/lib/"); // see: locate
root [1] .x test.c++

and / or:

root [0] gSystem->AddLinkedLibs("-lgslcblas -lgsl"); // see: gsl-config --libs
root [1] .x test.c++

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.