Dear cythoners,
I am wondering how to compile and use cython .c file indepently, not in python.
as far as I know, in general, people use cython to get .pyd file and import them in other .py file to get speed improved. But now I want use the output .C file independently, not in a python enviroment.
So far, I have tried to directly use GCC to compile .C files obtained through cython.
The command is:
gcc hello.c -L C:......\Python\Python310\libs\python310.lib -fPIC -DMS_WIN64
The error prompt is:
undefined reference to `__imp_PyType_IsSubtype'
undefined reference to `__imp__Py_Dealloc'
undefined reference to `__imp_PyModuleDef_Init'
and so many similar errors.
I think this is a problem with the .lib file, but I don't know whether I connected the .lib file in the wrong way or I connected the wrong lib file. Does anyone have any suggestions? What should I do?
Thanks to all