Hi.
gsl-1.11, Suse 11.0.
I'm trying to compile the little example program for matrices
in section8.4.13, page95 of the manual.
But I can't figure out the correct flags:
rk...@linux-7okp:~> cat f.c
#include <stdio.h>
#include <gsl/gsl_matrix.h>
int
main (void)
{
int i, j;
gsl_matrix * m = gsl_matrix_alloc (10, 3);
for (i = 0; i < 10; i++)
for (j = 0; j < 3; j++)
gsl_matrix_set (m, i, j, 0.23 + 100*i + j);
for (i = 0; i < 100; i++) /* OUT OF RANGE ERROR */
for (j = 0; j < 3; j++)
printf ("m(%d,%d) = %g\n", i, j,
gsl_matrix_get (m, i, j));
gsl_matrix_free (m);
return 0;
}
rk...@linux-7okp:~> gcc -I/usr/local/include f.c
/tmp/cc0jcO07.o: In function `main':
f.c:(.text+0x13): undefined reference to `gsl_matrix_alloc'
f.c:(.text+0x5d): undefined reference to `gsl_matrix_set'
f.c:(.text+0x98): undefined reference to `gsl_matrix_get'
f.c:(.text+0xca): undefined reference to `gsl_matrix_free'
collect2: ld returned 1 exit status
rk...@linux-7okp:~>
What are the correct flags here?
--
Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP
01223-764877
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl