uber / uber/h3

PloygonAlgos - Throws error when used wrapper library in swift

Open
#771 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
6.5k
Forks
627
Avg merge
3d 21h
Merged PRs (30d)
6

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Swift wrapper build and inspect the header that contains the listed macro checks. Trace how TYPE, IS_EMPTY, INIT_ITERATION, and ITERATE are expected to be defined before inclusion. Done means the Swift binding builds successfully without those preprocessor errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, swift
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.