I am trying to make Python bindings to interact with a C object, using Cython. I was given:
parser.o and parser.h
I've made my .pyx and .pxd files to define the methods and types that I'll use from the .h file. When I try to call a method that I defined in my .pxd that mirrors one defined in the .h, I get the error:
undefined symbol: function_name
My setup.py looks like:
from setuptools import setup, Extension
from Cython.Build import cythonize
extensions = [
Extension(
'parser',
['parser.pyx'],
)
]
compiler_directives = {'language_level': 3}
setup(
ext_modules = cythonize(
extensions,
**compiler_directives
)
)
I think I don't know how to include the parser.o files I was given. Any help on how to link the .o file with what I'm trying to do would be great.