I’ve created a basic app in visual studio with Qt and an openGL widget. I export a .pro file from the addin so that I can compile in Linux.
I get the message:
/usr/bin/ld: cannot find -lopengl32
/usr/bin/ld: cannot find -lglu32
… when running make.
The issue goes away and the program compiles fine if I remove:
LIBS += -lopengl32 \
-lglu32
… from the generated .pro file.
I understand the “export .pro” feature is not flawless, but is this the correct way to fix this problem?
I don’t quite remember the exact name of the OpenGL library on Linux, but it’s not opengl32. Rather libopengl. So it’s perfectly normal.
This will make you link with opengl32.lib on windows only:
and if needed, this will make you link with libopengl on Linux :
For the
macxplatform scope, I guess there is additional work to link with the OpenGL Framework.