openframeworks / openframeworks/openFrameworks

GLEW header conflicts on OSX10.9+

Open
#4,110 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core macOS section-2D wont-fix
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Not sure whether this is really our problem to fix or just something to be aware of but building an application with the OSX 10.9+ SDK results in an error on the line 7359 in glew.h

typedef ptrdiff_t GLintptrARB;
typedef ptrdiff_t GLsizeiptrARB;

I see:

fatal error: typedef redefinition with different types ('ptrdiff_t' (aka 'int') vs 'intptr_t' (aka 'long')) typedef ptrdiff_t GLintptrARB;

The following patch (which will get released in a new version of GLFW soon I think) fixes it: https://github.com/glfw/glfw/commit/e7c7ebf6658963edbca3945c1732e0116798d8dd

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 with glew.h around line 7359 and compare the linked GLFW commit with the version bundled by openFrameworks. Reproduce the build using an OSX 10.9+ SDK, then verify that the header no longer produces the conflicting typedef error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
build-system, computer-graphics, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.