dbenoit17 / dynamic-ffi

Auto define Racket bindings to C by parsing header files.
Other
28 stars 10 forks source link

generate-static-ffi: check for undefined symbol automatically #31

Closed sorawee closed 3 years ago

sorawee commented 4 years ago

As I understand, it should be possible to run get-ffi-obj and see if a symbol is defined at code generation time, correct? It should then be possible to omit symbols that are undefined.

dbenoit17 commented 4 years ago

This is a cool idea, but it also adds a dependency on the object-files being present to generate the FFI definitions. Currently, one should in theory be able to generate FFI definitions from header files alone.

I think I would prefer to implement this as a switch using a keyword argument, so the current behavior remains the default, but users can opt in to such a lookup at code-generation time.