jeudi 5 juin 2014

Accessing GSL Library with Cython


Vote count:

0




I am trying to use the GSL library in a Cython program but don't seem to have the paths correctly specified; I encounter the following error when I try writing a simple example:



%load_ext cythonmagic
%%cython -lgsl -lgslcblas

cdef extern from "gsl/gsl_ran_poisson_pdf.h":
double gsl_ran_poisson_pdf(int x, double mu)

def poison(int x, double mu):
return gsl_ran_poisson_pdf(x,mu)

/Users/nbmarwell/.ipython/cython/_cython_magic_189673701925d12059c18b75663da8bd.c:317:10: fatal error:
'gsl/gsl_mode.h' file not found
#include "gsl/gsl_mode.h"


I get the same error using CythonGSL and the demo program here: http://ift.tt/1fMwBoa


The GSL libraries are located in the following directories:



-I/usr/local/include
-L/usr/local/lib -lgsl


I know that similar questions have been asked on SO before, but I couldn't find one relevant to my situation and system (I'm using OS-X). Any help would be appreciated.


Thanks!



asked 33 secs ago






Aucun commentaire:

Enregistrer un commentaire