Breush / odin-binding-generator

An Odin library to convert a C header file into an Odin binding file.
MIT License
42 stars 20 forks source link

Failing to parse header files #2

Closed hazeycode closed 5 years ago

hazeycode commented 5 years ago
Breush commented 5 years ago

Ok, so... That a way too big issue, as there are many things happening.

I will split that into individual problems as I go testing. SMALL EDIT: My PC broke -_-' I won't be able to work on that as soon as I wanted.

By the way, you might want to run the preprocessor of a C compiler, because the binding generator will never be able to parse macros. Something like gcc -E /usr/include/zlib.h -o - | grep -v "# " > ./zlib.h. And if there are any defines you want to be present as constants, just extract them to an other .h so that they can be converted too.

Thank you for reporting!

Breush commented 5 years ago

With last commits, it should be fine for all of them as long as you run the C preprocessor on them first.