Hello.
In C source defined USE_UV macro:
#define USE_UV 1
How can I wrap that macro value in Nim?
In C source there is code that depends on USE_UV macro. That's why I need to wrap actual C code that depends on macro.
Any variants please?
You can use c2nim for your C files -- for .h and .c
#define USE_UV 1
should become
const USE_UV = 1
The question is, how that flag is used in in the C code. You may try what c2nim does with it, and ask again when what c2nim does did not work properly. (For my GTK wrappers, c2nim gennerally did it fine, with a few exception, which I fixed with some thinking. Unfortunately for that some understanding of the library can be necessary.)