问题
As it seems to be a larger problem to understand my question: It is NOT about any source code or programming implementation, it is about linking an existing and working program! So let me try that again:
I have an application which runs on both, Windows and Linux and makes use of the GLAD-wrapper for OpenGL. It works smoothly for Windows but recently I found it is not working for Linux any more (Ubuntu 18.04 LTS to be more specific).
The problem is: the call to
glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
in function gladLoadGLLoader() returns NULL, means the library function glGetString can't be found any more. To clarify this too: not the function glGetString() is returning NULL, when trying to retrieve a function pointer to glGetString the NULL is returned as the function could not be found for some reason.
I'm linking with -lGL which from my understanding should be the OpenGL/MESA-stuff containing glGetString()?
So...is this right or in which library can glGetString() be found?
来源:https://stackoverflow.com/questions/60261471/gladloadglloader-fails-because-glgetstring-is-not-found