When compiling a .c file with GCC (in PowerShell), I got the following error:
cd "E:\python_codeing\drawing with python"
gcc -O3 -o factorial factorial.c
Output:
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x21): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x3c): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x72): undefined reference to `_imp__PyDict_New'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xa2): undefined reference to `_imp__PyDict_New'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xbe): undefined reference to `_imp__PyMethod_New'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xfa): undefined reference to `_imp__PyUnicode_InternFromString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1b1): undefined reference to `_imp__PyExc_SystemError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1c4): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x2c1): undefined reference to `_imp__PyDict_Size'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x2e7): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x2f2): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x311): undefined reference to `_imp__PyDict_Size'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x341): undefined reference to `_imp__PyDict_Size'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x376): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x381): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x3cb): undefined reference to `_imp__PyUnicode_FromFormat'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x486): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x4e2): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x532): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x553): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x575): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x6c4): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x6ff): undefined reference to `_imp__PyObject_Free'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x719): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x725): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x735): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x745): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x755): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x765): more undefined references to `_imp___Py_Dealloc' follow
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x7ed): undefined reference to `_imp__PyObject_GC_UnTrack'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x7fd): undefined reference to `_imp__PyObject_ClearWeakRefs'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x813): undefined reference to `_imp__PyObject_GC_Del'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x9bf): undefined reference to `_imp__PyUnicode_FromString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x9d1): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xa75): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xa80): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xa9f): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xaaa): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xaf3): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xafe): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xb38): undefined reference to `_imp___Py_FalseStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xb64): undefined reference to `_imp__PyList_New'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xbaa): undefined reference to `_imp__PyImport_ImportModuleLevelObject'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xbec): undefined reference to `_imp__PyErr_Clear'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xbf2): undefined reference to `_imp___Py_TrueStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xc36): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xc45): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xc52): undefined reference to `_imp__PyObject_GetAttr'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xcec): undefined reference to `_imp__PyTuple_GetSlice'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xd07): undefined reference to `_imp__PyTuple_GetItem'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xd3b): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xe03): undefined reference to `_imp__PyMem_Malloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xe39): undefined reference to `_imp__PyTuple_New'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xea4): undefined reference to `_imp__PyDict_Next'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xf0d): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xf18): undefined reference to `_imp__PyErr_Format'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0xfea): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1029): undefined reference to `_imp__PyMem_Free'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1037): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1042): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x104d): undefined reference to `_imp__PyErr_NoMemory'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1063): undefined reference to `_imp__PyMem_Free'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x106d): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1086): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x10ad): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x10fa): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1101): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1114): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1126): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x113d): undefined reference to `_imp__PyExc_RuntimeWarning'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1158): undefined reference to `_imp__PyErr_WarnEx'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1185): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x119a): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x11ad): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x11c6): undefined reference to `_imp___Py_NoneStruct'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x11dd): undefined reference to `_imp__PyExc_RuntimeWarning'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x11f8): undefined reference to `_imp__PyErr_WarnEx'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1225): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x123a): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x124d): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1299): undefined reference to `_imp___Py_Dealloc'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x12a9): undefined reference to `_imp__PyExc_TypeError'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x12b4): undefined reference to `_imp__PyErr_SetString'
C:\Users\Tarek\AppData\Local\Temp\ccsF5FKE.o:factorial.c:(.text+0x1309): undefined reference to `_imp___Py_Dealloc'
I have tried to reinstall Mingw-w64, and I have already checked Cython is installed.
GCC is installed and Cython too.