I had a problem installing GNU Scientific Library (gsl). I put the package on my desktop and did "./configure", "make" and "sudo make install" according to the document. I checked the directory / usr / local / include, there is a newly created folder "gsl". But when I tried to use the functions provided by the library, the error "undefined to the error" gsl_sf_beta_inc "" occurred. Here is my code.
#include <stdio.h> #include <gsl/gsl_sf_gamma.h> int main (void) { double a = 20; double b = 1000; double x = 0.5; double result = gsl_sf_beta_inc(a, b, x); printf("%f/d", result); return 0; }
I realized that the problem could be caused by the fact that I put the package on the desktop so that the binary code generated by the "make" command goes there, which is wrong. So is my guess correct? If so, where should I put them? If this is not so, what should I do? Thanks.
source share