Dear bug-gsl,
I have tried to compile my C++ source code, which makes use of the gsl
interp2d library (trying to adapt the example at
http://www.gnu.org/software/gsl/manual/html_node/2D-Interpolation-Example-programs.html#g_t2D-Interpolation-Example-programs),
but it seems that some libraries cannot be found:
→ g++ solution.cpp -lgsl -lgslcblas
solution.cpp: In function ‘int main()’:
solution.cpp:51:2: error: ‘gsl_interp2d_type’ was not declared in this
scope
gsl_interp2d_type *T = gsl_interp2d_bilinear;
^
solution.cpp:51:21: error: ‘T’ was not declared in this scope
gsl_interp2d_type *T = gsl_interp2d_bilinear;
^
solution.cpp:51:25: error: ‘gsl_interp2d_bilinear’ was not declared in
this scope
gsl_interp2d_type *T = gsl_interp2d_bilinear;
^
solution.cpp:67:46: error: invalid conversion from ‘void*’ to
‘double*’ [-fpermissive]
double *za = malloc(nr * nt * sizeof(double));
^
solution.cpp:68:3: error: ‘gsl_spline2d’ was not declared in this scope
gsl_spline2d *spline = gsl_spline2d_alloc(T, nr, nt);
^
solution.cpp:68:17: error: ‘spline’ was not declared in this scope
gsl_spline2d *spline = gsl_spline2d_alloc(T, nr, nt);
^
solution.cpp:68:54: error: ‘gsl_spline2d_alloc’ was not declared in
this scope
gsl_spline2d *spline = gsl_spline2d_alloc(T, nr, nt);
^
solution.cpp:100:39: error: ‘gsl_spline2d_set’ was not declared in
this scope
gsl_spline2d_set(spline, za, r, t, A);
^
solution.cpp:106:46: error: ‘gsl_spline2d_init’ was not declared in
this scope
gsl_spline2d_init(spline, ra, ta, za, nr, nt);
^
solution.cpp:109:53: error: ‘gsl_spline2d_eval’ was not declared in
this scope
Aval = gsl_spline2d_eval(spline, 2., 2., racc, tacc);
^
solution.cpp:113:26: error: ‘gsl_spline2d_free’ was not declared in
this scope
gsl_spline2d_free(spline);
^
I have downloaded GSL from this link -->
http://mirrors.muzzy.it/gnu/gsl/gsl-latest.tar.gz and I have compiled
it with
./configure
make
sudo make install
My OS is Ubuntu 14.04.
Is it a problem with my system or is some component missing?
Thank you very much, and many apologies for bothering you.
cheers,
stefano