3 ms·
... And? Most languages make C interop simple.
by gizmo686 2y ago
... And? Most languages make C interop simple.
- varjag 2y agoThey quickly become unwieldy on non-trivial APIs, with hundreds of definitions across dozens of files and with macros to boot. Naturally people would still get the job done but it's beyond simple.
- mcronce 2y agoThat's what bindgen is for, as was mentioned in the original comment you replied to.
- varjag 2y agoHow well does it handle preprocessor macros in APIs?
- marshray 2y agoI have used it successfully against header files for Win32 COM interfaces generated from IDL which include major parts of the infamous "windows.h". Almost every type is a macro. This is an extremely well-understood space. Just open the docs and do it.
- varjag 2y agoNot types, functions. Where the macro is essentially a forward declaration but the implementation is deep inside the code and is not exposed via headers.