[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] an error while compiling c++ using GSL

From: Mohammadamin Izadi
Subject: [Help-gsl] an error while compiling c++ using GSL
Date: Mon, 1 Jan 2018 17:56:28 +0330

I want to use GSL for my project.
I downloaded the version 2.4 from your site and use these commands according to 
install file
sudo su
make check
make install
the file gsl exists in "/usr/local/include" .
but when I want to compile this code by "make":
#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>
main (void)
double x = 5.0;
double y = gsl_sf_bessel_J0 (x);
printf ("J0(%g) = %.18e\n", x, y);
return 0;
this message appears :
g++     bessel_func.cpp   -o bessel_func
/tmp/ccZymBuK.o: In function `main':
bessel_func.cpp:(.text+0x23): undefined reference to `gsl_sf_bessel_J0'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'bessel_func' failed
make: *** [bessel_func] Error 1

I use ubuntu 16.0.4 64 bit and g++

I hope you have enough time to answer me.
Thanks in advance.
Best regards.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]