Sadiksha Gautam
Sadiksha Gautam

Reputation: 5152

cygwin undefined refernce to _gsl_rng_ windows 7

I am using windows 7. For C++, I installed eclipse for java first and then added cdt to it. I also installed cygwin to my system. Also, changed the path of environment variables to C:\Programs\Cygwin\bin. I have used gsl in the program like

service_gen = gsl_rng_alloc(gsl_rng_default);

I have also included the lib file

#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

But when I give command make from cygwin it is giving me error: undefined reference to _gsl_rng_default and so on. I also checked whether gsl folder exists in my cygwin folder or not, and it is there. I have been trying to solve this problem for hours and nothing works. Can anyone help me?

Upvotes: 1

Views: 326

Answers (1)

Sadiksha Gautam
Sadiksha Gautam

Reputation: 5152

I needed to add C:\Programs\Cygwin\lib\lapack to my environment variables. Lapack has gsl and its path was needed!

Upvotes: 1

Related Questions