This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unable to compile example program;


> gcc gsl.c -o gsl

You need to link the gsl library using -lgsl
Check the manual for details.

> 2. How do I know which header file to include for a
> given function and dependencies of the given function
> on others.  The manual lists only function description
> with return types etc. It does not mention header
> files necessary and depedencies.

You could use grep to search the gsl header files for the function you
need. I don't know in which dir RH stores those files, my guess is
/usr/include/gsl

$ grep gsl_sf_bessel_J0 /usr/include/gsl/*
gsl_sf_bessel.h:int gsl_sf_bessel_J0_e(const double x,  gsl_sf_result *
result);
gsl_sf_bessel.h:double gsl_sf_bessel_J0(const double x);

If that does not work on your system, search for the header files and use
that dir.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]