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]

unable to compile example program;


1. I am trying compile the example program:

=============================================
#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>

int
main (void)
{
  double x = 5.0;

  double y = gsl_sf_bessel_J0 (x);

  printf("J0(%g) = %.18e\n", x, y);

  return 0;
}
=============================================
using 

gcc gsl.c -o gsl 

and getting the error:
-----------------------------------------
undefined reference to `gsl_sf_bessel_J0'
collect2: ld returned 1 exit status
--------------------------------------------

OS redhat 7.1 on PIV
gsl version .7

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.
Sasidhar


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com


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