Hello,
I've decided to use Nimrod as the language for our multi-platform desktop application which needs to call 3rd party C library (Swiss Ephemeris).
It was a long time since I did C hacking and need some help how to tweak C header in order to make c2nim happy and still have input file which can be processed with c2nim on different platforms (besides Linux).
Here is the link for the C header file (swephexp.h) which provides API for the whole library:
c2nim swephexp.h fails at:
home/gour/prj/sweph/src/sven/swephexp.h(470, 37) Error: ';' expected
If I comment #470:
#define ext_def(x) extern EXP32 x FAR PASCAL_CONV EXP16)
and change #471 into:
int32swe_heliacal_ut(double tjdstart_ut, double *geopos, double *datm, double *dobs, char *ObjectName, int32 TypeEvent, int32 iflag, double *dret, char *serr);
c2nim can cope with such declaration, but I wonder how to tweak such declarations and handle those C macros in order to be able to build Nimrod bindings for this library on non-Linux (aka Windows & Mac OS) platforms?