- publishing free software manuals
GNU Scientific Library Reference Manual - Third Edition (v1.12)
by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi
Paperback (6"x9"), 592 pages, 60 figures
ISBN 0954612078
RRP £24.95 ($39.95)

Get a printed copy>>>

2.2 Compiling and Linking

The library header files are installed in their own ‘gsl’ directory. You should write any preprocessor include statements with a ‘gsl/’ directory prefix thus,

#include <gsl/gsl_math.h>

If the directory is not installed on the standard search path of your compiler you will also need to provide its location to the preprocessor as a command line flag. The default location of the ‘gsl’ directory is ‘/usr/local/include/gsl’. A typical compilation command for a source file ‘example.c’ with the GNU C compiler gcc is,

$ gcc -Wall -I/usr/local/include -c example.c

This results in an object file ‘example.o’. The default include path for gcc searches ‘/usr/local/include’ automatically so the -I option can actually be omitted when GSL is installed in its default location.

ISBN 0954612078GNU Scientific Library Reference Manual - Third Edition (v1.12)See the print edition