Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS building from Xcode #8

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

brianmichel
Copy link
Contributor

@brianmichel brianmichel commented Oct 21, 2023

When building on macOS using the command line tools would build this project fine, however when switching to Xcode you would encounter errors that looked like this:
Screenshot

This seems to be because the sentry module which is only a single header and module map will fail to create a .o file since it has no implementation files. I've added a dummy.c with a comment on why it exists (since it has no code) and this seems to resolve the issue.

I also took this opportunity to add a call to run the macOS runloop in the example so you can see the Sentry output, as well as take a first stab at basic CI to ensure we're building macOS and Windows.
(Note: I realized that without #6 being fixed, there isn't an easy way to get the vendored assets, so CI will have to wait a little longer)

How To Test

  1. Run swift build on macOS after setting up your vendored sources on this branch
  2. Run the build from Xcode after setting up your vendored sources on this branch

@brianmichel brianmichel requested review from compnerd and removed request for compnerd October 21, 2023 13:42
@brianmichel brianmichel merged commit d9bd271 into main Oct 23, 2023
@brianmichel brianmichel deleted the brian/fix-xcode-compilation branch October 23, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants