This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
stupid question
- From: "Matthew J. Doller" <mdoller at wpi dot edu>
- To: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: 27 Nov 2001 15:46:38 -0500
- Subject: stupid question
can someone shed a tiny bit of light on why this seemingly simple
routine is not compiling for me?
--- BEGIN CODE ---
#include "matrix-generic.h"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
gsl_matrix * matrix_return_upper ( gsl_matrix *m ){
int num_rows, num_cols, error;
num_rows = m->size1;
num_cols = m->size2;
gsl_matrix * return_matrix = gsl_matrix_alloc ( num_rows , num_cols );
...
...
return (gsl_matrix *) return_matrix;
}
--- END CODE ---
compile command:
gcc -o mytest matrix-generic.c -lgsl -lgslcblas -lm
compile errors:
matrix-generic.c: In function `matrix_return_upper':
matrix-generic.c:30: parse error before `*'
the * in question is from the line:
gsl_matrix * return_matrix = gsl_matrix_alloc ( num_rows , num_cols );
for now, i have stripped out all the rest of the code after that line to
simplify debugging. please tell me that i'm over looking something
simple.
thanks in advance
matt
--
Matthew J. Doller
mdoller@wpi.edu
http://www.wpi.edu/~mdoller