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

Guard OPENGL_LIB dependent code #152

Closed
wants to merge 1 commit into from
Closed

Conversation

rib
Copy link
Contributor

@rib rib commented Jan 23, 2018

This guards the epoxy_gl_dlsym code that depends on the OPENGL_LIB
define. This fixes building for Android or Windows.

This guards the epoxy_gl_dlsym code that depends on the OPENGL_LIB
define. This fixes building for Android or Windows.
@@ -648,7 +648,7 @@ epoxy_gl_dlsym(const char *name)
return do_dlsym(&api.gl_handle,
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL",
name, true);
#else
#elif defined(OPENGL_LIB)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is correct.

The #if defined(OPENGL_LIB) ... #endif block should only be used around the:

    if (!api.gl_handle)
        get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false);

block. The following block will call dlsym() if the gl_handle is set, and if it isn't, it'll do a dlopen().

The only difference between the Android and Linux paths is that on Linux there's an OPENGL_LIB define in the latter but not in the former.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is also not really accurate: the Windows conditional path already exists.

@ebassi ebassi closed this in f6d2b1f Feb 23, 2018
@ebassi
Copy link
Collaborator

ebassi commented Feb 23, 2018

I ended up pushing a possible fix; please, feel free to re-open if the build still fails.

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.

None yet

2 participants