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

Cmake GLEW linking #96

Closed
wants to merge 1 commit into from
Closed

Cmake GLEW linking #96

wants to merge 1 commit into from

Conversation

ToppDev
Copy link

@ToppDev ToppDev commented Dec 14, 2020

Hello,

your current develop branch was not linking correctly under Arch Linux.

I got errors like this

/usr/bin/ld: ../application/libapplication.a(imgui_impl_opengl3.cpp.o): warning: relocation against `__glewGetUniformLocation' in read-only section `.text'
/usr/bin/ld: ../application/libapplication.a(renderer_ogl3.cpp.o): in function `RendererOpenGL3::Create(Platform&)':
renderer_ogl3.cpp:(.text+0x7f): undefined reference to `glewInit'
/usr/bin/ld: ../application/libapplication.a(imgui_impl_opengl3.cpp.o): in function `ImGui_ImplOpenGL3_SetupRenderState(ImDrawData*, int, int, unsigned int)':
imgui_impl_opengl3.cpp:(.text+0x1a0): undefined reference to `__glewBlendEquation'
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x378): undefined reference to `__glewUseProgram'
/usr/bin/ld: imgui_impl_opengl3.cpp:(.text+0x389): undefined reference to `__glewUniform1i'
...

To fix this, I had to link glew to the application library.

@ToppDev
Copy link
Author

ToppDev commented Dec 14, 2020

As the checks here fail there is a interesting thing happening. On Ubuntu, you don't need glew, therefore it is also not in your travis scripts. But on my Arch Linux I need it.

Would you prefer adding apt install libglew-dev to your travis files or is there another solution to this problem?

@thedmd
Copy link
Owner

thedmd commented Dec 25, 2020

Linking is failing, because GLEW is installed on your system. Is that correct?
I will probably just disable extension loading as examples does not need that.

@thedmd
Copy link
Owner

thedmd commented Dec 25, 2020

Your issue is addressed in a8b1be2.
Please confirm that examples are linking fine now. If not, please report new issue.
Thanks!

@thedmd thedmd closed this Dec 25, 2020
@ToppDev
Copy link
Author

ToppDev commented Dec 26, 2020

just checked it. Works now without problems

Thank you for solving 👍

@ToppDev ToppDev deleted the Cmake-Glew-Linking branch December 26, 2020 16:50
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