I'm a bit unclear what you mean by "support code" but if you're just
talking about files listed in the sources attribute along with your
pyx file, you could simply write
cdef extern from "support.cpp":
pass
and it would insert an #include "support.cpp" into the generated C.
- Robert
Hi,
To compile pyx files in cpp you can use the create_extension_list method before use cythonize:
from Cython.Build.Dependencies import create_extension_list
modules_list = create_extension_list("*_cpp.pyx",exclude=["*_c.pyx"])
for module in modules_list:
module.language = "c++"
ext_modules = cythonize(pyx_modules)