From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Matthew J. Doller" To: gsl-discuss Subject: stupid question Date: Wed, 19 Dec 2001 13:20:00 -0000 Message-id: <1006893998.25374.4.camel@mrburns> X-SW-Source: 2001/msg00737.html 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 #include 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9156 invoked by alias); 27 Nov 2001 20:47:49 -0000 Mailing-List: contact gsl-discuss-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 9128 invoked from network); 27 Nov 2001 20:47:47 -0000 Received: from unknown (HELO localhost.localdomain) (141.154.66.150) by hostedprojects.ges.redhat.com with SMTP; 27 Nov 2001 20:47:47 -0000 Received: (from mdoller@localhost) by localhost.localdomain (8.11.6/8.11.6) id fARKkdS26956; Tue, 27 Nov 2001 15:46:39 -0500 X-Authentication-Warning: localhost.localdomain: mdoller set sender to mdoller@wpi.edu using -f Subject: stupid question From: "Matthew J. Doller" To: gsl-discuss Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.2 (Preview Release) Date: Mon, 19 Nov 2001 10:26:00 -0000 Message-ID: <1006893998.25374.4.camel@mrburns> Mime-Version: 1.0 X-SW-Source: 2001-q4/txt/msg00061.txt.bz2 Message-ID: <20011119102600.91LUeykohWwjRQnV8qKMx8-g-QPvrZeajkYJdlqOgoM@z> 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 #include 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