質問

I'm trying to use glDrawArraysInstancedBaseInstance but the linker complains that __glewDrawArraysInstancedBaseInstance is unresolved.

glew-1.9.0 is installed on the machine and as far as I can tell it should be linking it.

As temporary work around, I'm just fetching the function myself, which works. But it does not help me understand why glew does not appear to be working for that function.

And actually glew does not appear to be working for anything opengl 3.3+

To verify that the function should be available I use glfwExtensionSupported("GL_ARB_base_instance").

To be clear, this is the GLFW function, not GLEW's extension checker.

I'm using glfw to create my window and a 4.3 core profile context

My system:
NVidia gtx 550 ti, with latest drivers
Ubuntu 12.04

To compile this I'm using CMake for the make files and in CMakeLists.txt:
target_link_libraries(app GL GLU GLEW glfw)

役に立ちましたか?

解決

It turns out to be that when installing glew-1.9.0, it was being installed to /usr/lib64 and this was only one of the two problems that were happening.

One of the problems was that glew-1.7.0 was installed in /usr/local/lib64, and my app was using this version of glew.

  • I found this by doing find /usr -name libGLEW*

And the other was that ldconfig did not know about /usr/lib64.

  • This was found by doing ldconfig -p > report.txt and looking to see what directories ldconfig was looking in. Which turned out to be helpful because I thought /usr/lib64 was a "trusted" directory, and that was not the case.

Armed with this information glew-1.7.0 was removed, ldconfig was updated and now everything works as expected.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top