Hi Abdolvahed,

You simply include the header of the section of gsl that you want in your C
or C++ code, then you link gsl in your compile command.

For example, lets suppose you want to use
gsl_stats_median_from_sorted_data() (section 21.9 of the manual). You look
in the first few paragraphs of the chapter it is in. In this case, at the
start of chapter 21 it has explained that depending on the type of your
data, you should either include gsl_statistics_double.h or
gsl_statistics_int.h. But GSL puts all its header files in a separate
directory, so you can include the first with this code at the beginning of
your code.

#include <gsl/gsl_statistics_double.h>

You then use the function as you wish.

After compiling (or in compiling and linking if you do them at once) you
include the following flags to gcc your gcc command.

-lcblas -lgsl -lm

I hope this helps.


On Thu, Feb 20, 2014 at 1:26 AM, Rhys Ulerich <rhys.uler...@gmail.com>wrote:

> > I downloaded the GSL but I do not know how can I use it in my
> Linux\Fedora 20.
> > Please help me.
>
> On Fedora, I recommend using canned GSL packages unless you know how
> to build from source:
>     sudo yum install gsl gsl-devel
>
> What do you want to do once GSL is installed?
>
> - Rhys
>
>

Reply via email to