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

Yosemite Xcode - redefinition errors #66

Closed
ackoujens opened this issue Jan 4, 2016 · 3 comments
Closed

Yosemite Xcode - redefinition errors #66

ackoujens opened this issue Jan 4, 2016 · 3 comments
Milestone

Comments

@ackoujens
Copy link

When I use dylibs (libGLEW.1.13.0.dylib) made from the zip file from the glew website, my code runs nice and pretty but when I compile my own from this git repo, Xcode throws a shitload of redefinition errors.

Aren't these exactly the same or it there a difference?

@ackoujens
Copy link
Author

Alright, some more details about my issue.
I was trying to get this https://github.com/andersonfreitas/opengl-boilerplate to work in Xcode.

So I just commented out every redefinition error and it seems to compile and run.
Not sure if I'm mutilating glew but here you can see what I needed to alter to make this work.

glew.zip

Hope there's a solution so this'll turn into an out of the box experience for me :D

@nigels-com
Copy link
Owner

Ah, interesting. I can reproduce this problem on Linux too.

It appears that opengl-boilerplate is trying to generate an old version of GLEW with the current version of the OpenGL specifications. Here is a workaround that works for me:

cd external/glew
git clean -xdf .
git reset --hard glew-1.13.0
cd auto/registry
git clean -xdf
git reset --hard glew-1.13.0
touch gl/specs/.dummy
cd ../..
make extensions
cd ../..

And a-la, it works again...

$ make
Scanning dependencies of target glew
[  4%] Building C object CMakeFiles/glew.dir/external/glew/src/glew.c.o
[  8%] Linking C static library libglew.a
[  8%] Built target glew
Scanning dependencies of target glfw
[ 13%] Building C object external/glew/src/CMakeFiles/glfw.dir/clipboard.c.o
[ 17%] Building C object external/glew/src/CMakeFiles/glfw.dir/context.c.o
[ 21%] Building C object external/glew/src/CMakeFiles/glfw.dir/gamma.c.o
[ 26%] Building C object external/glew/src/CMakeFiles/glfw.dir/init.c.o
[ 30%] Building C object external/glew/src/CMakeFiles/glfw.dir/input.c.o
[ 34%] Building C object external/glew/src/CMakeFiles/glfw.dir/joystick.c.o
[ 39%] Building C object external/glew/src/CMakeFiles/glfw.dir/monitor.c.o
[ 43%] Building C object external/glew/src/CMakeFiles/glfw.dir/time.c.o
[ 47%] Building C object external/glew/src/CMakeFiles/glfw.dir/window.c.o
[ 52%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_clipboard.c.o
[ 56%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_gamma.c.o
[ 60%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_init.c.o
[ 65%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_joystick.c.o
[ 69%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 73%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_time.c.o
[ 78%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_window.c.o
[ 82%] Building C object external/glew/src/CMakeFiles/glfw.dir/x11_unicode.c.o
[ 86%] Building C object external/glew/src/CMakeFiles/glfw.dir/glx_context.c.o
[ 91%] Linking C static library libglfw3.a
[ 91%] Built target glfw
Scanning dependencies of target opengl-boilerplate
[ 95%] Building CXX object CMakeFiles/opengl-boilerplate.dir/main.cpp.o
[100%] Linking CXX executable opengl-boilerplate
[100%] Built target opengl-boilerplate

@ackoujens
Copy link
Author

Thanks again code magician. I learn something new on GitHub every day it seems.

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

No branches or pull requests

2 participants