@cImport not handling #ifdefs correctly and including unix libraries even on windows

I would avoid applying @cImport to the implementation part of any header only library, because it is unnecessary and increases the chances that you will have problems with the c translation. Instead just use @cImport with the header (without the implementation define set) and then add the implementation by adding it as a c source (for example by adding the c source to the module via the build system).

1 Like