[Pyrex] newbie question: error using pyrex

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Sep 19 00:21:37 CEST 2007


Christian Meesters wrote:

> cdef extern from "math.h"

You'll need to put declarations in there for the
functions you want to use from math.h, e.g.

   cdef extern from "math.h":
     double sqrt(double)

> /home/cm/bin/mc_rigid_dir/src/pofr_module.pyx:1:25: Expected ':'

That's because the 'cdef extern from' statement needs
a suite after it. If you really need an empty one, you
can put 'pass' in the body, but that's almost always
useless.

--
Greg



More information about the Pyrex mailing list