I'm trying to use GSL for my project using Code::Blocks. After much searching and googling, I've finally got past the compiler but still the code didn't run because of an undefined reference. My code is just the sample problem given by the GSL manual:
#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>
int main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_J0 (x);
printf ("J0(%g) = %.18e\n", x, y);
return 0;
}
I followed all the steps everyone on the Internet has told me (putting the include folder in Search directories/Compiler, the lib folder in Search directories/Linker, and the two .a files under Linker settings).
Still the undefined reference error persisted. I'm quite lost at this stage. Any help will be greatly appreciated.
Edit: I'm so sorry I'm new to the rules. Here are the images of the Code::Blocks build options: