help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Linear Algebra Documentation Examples help


From: Jordi Gutierrez Hermoso
Subject: Re: [Help-gsl] Linear Algebra Documentation Examples help
Date: Thu, 29 Mar 2007 08:27:29 -0600

On 29/03/07, address@hidden <address@hidden> wrote:
I'm trying to compile the program listing in the documentation for the
linear algebra section
I am getting the following result:

gcc matrix_test.cpp
/tmp/ccaENm9Y.o: In function `main':
matrix_test.c:(.text+0x8f): undefined reference to `gsl_matrix_view_array'
[more linker errors snipped out]

Those are linker errors. You need to tell gcc to link with the GSL.
Pass the -lgsl and -lgslcblas parameters at the end to gcc:

    gcc matrix_test.cpp -lgsl -lgslcblas

This, of course, is assuming you correctly compiled the GSL and put it
somewhere where gcc can find it. See section 2.2.1 of the GSL manual:

    
http://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the-library.html

HTH,
- Jordi G. H.




reply via email to

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