I got multiple files to compile to a standalone exe using cython.
compile.py
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [
Extension("TheMainFile", ["TheMainFile.py"]),
Extension("HelperClass", ["HelperClass.py"]),
Extension("HelperClass2", ["HelperClass2.py"]),
]
setup(
name = 'Main',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)
The main
file that should be run by the exe is TheMainFile
running the following command
python .\compiler.py build_ext --inplace
creates 3 .c
files, in the build dir however is no .exe, just .lib
,.exp
and .obj
files.
Manually adding these files to a VS Projects to build, results in the following error
"Python.h": No such file or directory
Adding the following files to the project from C:\Python\include
lastly results in "structmember.h": No such file or directory
My question is:
How do I compile these files to a binary where TheMainFile
is executed.