Here is the test.py file :
import numpy as np
def test(abc): # abc is numpy array
c = np.sum(abc)
return c
I tried converting it to test.pyx like this:
import numpy as np
cpdef public double test(abc): # abc is numpy array
cdef double c = np.sum(abc)
return c
using the command-line, I have successfully generated code: test.c, test.h
The command line used is: python setup.py build_ext --inplace
I have copied the include from the Python 3.7 folder and placed it in the same folder where my test.c and test.h
are available.
Now I want to know how I can convert the .c file to .dll file after compilation?
I have seen these SO references:
Can Cython code be compiled to a dll so C++ application can call it?
Use generated header file from Cython
Using Cython to expose functionality to another application
But I am quite naive to understand this. Hence, I need help to understand how I can convert the .c to .dll.
Here is the test.c file: test.c and test.h