I've always been confused about how to go about using the API mode. I followed the docs and got stuck.
In the issue filed below, I'm trying to show how I created the API wrapper by reading the contents of my header directly into set_source(). The result doesn't work.
with open(os.path.join(_script_path, 'mylib/myheader.h'), 'r') as myfile:
source = myfile.read()
ffibuilder.set_source("_mylib", source, libraries=['mylib'])
I have also tried to do it like this and it doesn't work either.
ffibuilder.set_source("_mylib", "#include <mylib/myheader.h>", libraries=['mylib'])
What doesn't work is the resulting proxy/wrapper. When I go to use the wrapper library, the functions are not available/exported. Clearly, I'm missing something. Can someone offer me some coding advice?
I've documented this issue more completely here: