Tuesday, March 2, 2010

Compiling programs that use GSL

GCC:
$ gcc myprogram.c `pkg-config --cflags --libs gsl` -o myprogram

Eclipse:
add compiler / linker settings (alt+enter) to match (individually -I -L -l ...fileds)
$ pkg-config --cflags --libs gsl
-I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas -lm

No comments: