Try:
gcc -c -IC:\Python27\include -o ctest.o ctest.c
gcc -shared -LC:\Python27\libs -o ctest.pyd ctest.o -lpython27
-shared
creates a shared library. -lpython27
links with the import library C:\Python27\libs\libpython27.a.
More Related Contents:
- Is it feasible to compile Python to machine code?
- Wrapping a C library in Python: C, Cython or ctypes?
- Can Cython compile to an EXE?
- Minimal set of files required to distribute an embed-Cython-compiled code and make it work on any machine
- Compile Python code to statically linked executable with Cython
- Difference between np.int, np.int_, int, and np.int_t in cython?
- Using Cython To Link Python To A Shared Library
- Wrapping a pre-initialized pointer in a cython class
- Passing C++ vector to Numpy through Cython without copying and taking care of memory management automatically
- Passing numpy arrays in Cython to a C function that requires dynamically allocated arrays
- Extending python – to swig, not to swig or Cython
- Call python code from c via cython
- Given the state of the stack and registers, can we predict the outcome of printf’s undefined behavior
- What is the internal precision of numpy.float128?
- Force NumPy ndarray to take ownership of its memory in Cython
- How to profile cython functions line-by-line
- In python, how to capture the stdout from a c++ shared library to a variable
- Simple wrapping of C code with cython
- Interpretation vs dynamic dispatch penalty in Python
- What files are required for Py_Initialize to run?
- Numpy vs Cython speed
- Running Cython in Windows x64 – fatal error C1083: Cannot open include file: ‘basetsd.h’: No such file or directory
- Why allow concatenation of string literals?
- Mixing cdef and regular python attributes in cdef class
- Why we need Clobbered registers list in Inline Assembly?
- Where can I find source or algorithm of Python’s hash() function?
- ImportError: dynamic module does not define init function (initfizzbuzz)
- reload module with pyximport?
- SWIG interfacing C library to Python (Creating ‘iterable’ Python data type from C ‘sequence’ struct)
- Embedding python in multithreaded C application