h3 icon indicating copy to clipboard operation
h3 copied to clipboard

PloygonAlgos - Throws error when used wrapper library in swift

Open jj10133 opened this issue 2 years ago • 2 comments

I don't know who's fault is this, I'm currently creating a binding for swift to use the library. However it couldn't build as it threw an error. Below is the list of macros that were throwing the error.

`#ifndef TYPE #error "TYPE must be defined before including this header" #endif

#ifndef IS_EMPTY #error "IS_EMPTY must be defined before including this header" #endif

#ifndef INIT_ITERATION #error "INIT_ITERATION must be defined before including this header" #endif

#ifndef ITERATE #error "ITERATE must be defined before including this header" #endif`

Screenshot 2023-06-13 at 7 07 00 PM

jj10133 avatar Jun 14 '23 00:06 jj10133

I was searching for TYPE in the project but couldn't find it?

jj10133 avatar Jun 14 '23 17:06 jj10133

The TYPE is defined in linkedGeo.c and polygon.c - the idea is that the macros allow the code in polygonAlgos.h to be polymorphic in a way that's otherwise difficult in C. You shouldn't be including polygonAlgos.h directly - it's included in these two files.

nrabinowitz avatar Jun 21 '23 18:06 nrabinowitz