Solved the problem. I changed: cdef public void inittestpyx() to: cdef extern from "testpyx.h": void inittestpyx() and it all works like a charm, at least on Linux. Cheers, Rasjid.