Score:0

Ubuntu 22.04, mingw64, how to link applications which use opengl extensions ("glew" lib missing?)

lv flag

I try to compile/link a Windows app on Ubuntu 22.04 through "mingw64". Up to now, I had to compile and use "glew" on my own. However, after switching to 22.04, it seems that all OpenGL extensions are already known, so that I can no longer include "glew.h". If I do so, I get "multiple declaration" errors, where e.g. things like "__glewUniformXYZ" are being found twice (more specific it is found in my "glew.h" and it is found in "GL/glext.h").

That forced me to get rid of my old #include glew.h code and replace it by "#include GL/glext.h". So far so good. It all compiles well now. However, when trying to link my app, it can't find any OpenGL extension commands anymore (such as "glBindFrameBufferEXT", etc.).

So, now my question: what additional library should I link to my app?

  • I guess it will be something like "libglew32.a" (suggested by chatGPT ;) ).

  • However, 22.04 doesn't come with such a lib? Is there a additional package I can install?

What is the intended way to compile an app under 22.04/mingw64 which makes use of OpenGL extensions?

Thanks for your help!

Score:0
lv flag

glext.h and glew.h seem to be two different approaches/techniques to the same problem (providing OpenGL extensions), and thus they cannot be mixed.

I carefully removed all GL/glext.h includes and that solved the problem, since I was able to link against glew.a again.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.