Open DiThi opened 1 year ago
Hmm, this is unfortunate. I believe it's an easy fix though. Do you find those values in the Opir file?
I searched for one of the constant strings in the nim cache directory (where I can find opir json files), but it only appears in a cached version of the c2nim version of the module.
Ah also I think the problem persists when I use #define
instead of consts. I did try replacing one of them and the result was the same, except that the type was inferred from the literal.
Here's an example:
https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_capi.h#L65
None of those values are present in the generated bindings (ulongs, cstrings, etc). Therefore ints are zero, cstrings are null, etc.
As a workaround, I used c2nim to translate them and it had some problems: culong/culonglong values were suffixed with 'i64 when culong should be 'u32, and culonglong should be 'u64.