opengl-boilerplate icon indicating copy to clipboard operation
opengl-boilerplate copied to clipboard

Redefinition errors

Open ackoujens opened this issue 9 years ago • 10 comments

I'm going to leave this here in the hope of being answered.

I cloned your project and followed the instructions but when I open this up in Xcode I get a load of redefinition errors. These are being caused by glew (I left an issue report there also).

If you in any case know what this may be causing, please let me know.

Working on a macbook pro using El Capitan

ackoujens avatar Jan 05 '16 20:01 ackoujens

Could you share the error log?

andersonfreitas avatar Jan 05 '16 21:01 andersonfreitas

Here is a zip file with my Xcode error log and the altered glew.c file. I commented out the redefinitions and the compilation all went well. glew.zip

What's bothering me is that it normally wouldn't be necessary to do this and it should all work out of the box in my opinion.

ackoujens avatar Jan 05 '16 22:01 ackoujens

I did some troubleshooting for this on Linux. See: https://github.com/nigels-com/glew/issues/66

The easy fix to advance external/glew to version 1.13.0, rather than 1.10.0. The longer story is that glew itself is using a git repository of the OpenGL specs, but the default behavior by GLEW is to use the latest version of the specs, not those that corresond to 1.10.0 (and work!).

I'll file a merge request or two for opengl-boilerplate.

Nice project, BTW, I think I'll start using this, now I know about it!

-- Nigel

nigels-com avatar Jan 08 '16 11:01 nigels-com

For what it's worth, my opinion is that it would be wiser for opengl-boilerplate to use a numbered release for both the glew and glfixes repositories (for a pre-generated snapshot from a .tgz) rather than top-of-tree of either of those.

-- Nigel

nigels-com avatar Jan 08 '16 12:01 nigels-com

Yeah pulling in the submodules seems like a good idea but when either of those change, it could break the project like in this case. Glad you found what the issue was. Chopping away the redefs was a pain in the ass.

ackoujens avatar Jan 08 '16 12:01 ackoujens

GLEW can share some of the blame for this. GLEW itself it using git to track the OpenGL specifications, but is fetching the most recent version by default, which is normally what's expected. I'll educate myself some more about submodules, and if GLEW ought to use that rather than Makefile scripting.

nigels-com avatar Jan 08 '16 12:01 nigels-com

Hi @nigels-com, thank you for checking this out. Going to merge your PR tonight :+1:

andersonfreitas avatar Jan 08 '16 18:01 andersonfreitas

I'm experiencing an error with a similar cause on OSX. Using the currently pinned version of glew causes make to fail while building glew because of an unknown type, PFNGLGETVKPROCADDRNVPROC. Updating glew to 2.0.0 appears to fix this issue.

SamDeakin avatar Feb 04 '17 06:02 SamDeakin

My build fails because of PFNGLGETVKPROCADDRNVPROC as well on OSX. Though updating glew to 2.0 doesn't fix it for me. Weird?

Tsarpf avatar Jul 19 '17 19:07 Tsarpf

Okay now it worked after following the steps here https://github.com/nigels-com/glew/issues/66#issuecomment-169976941. I guess I hadn't cleared some cache entirely.

Tsarpf avatar Jul 19 '17 19:07 Tsarpf