Static Linking

Started by
7 comments, last by V-man 16 years, 2 months ago
Hello All I am using OpenGL with MFC, and I am wondering how to do static linking for GL libraries (gl, glu, glut, glaux,…) so that I don’t have to ask other guys to install these libraries on their PC's
Advertisement
You can't static link these libraries. (I don't know for glut, you may look for freeglut if it is possible). Besides that, I see you mention glaux. You should avoid to use glaux because it is VERY outdated today.

opengl32.dll and glu32.dll are always installed on any modern system. So you shouldn't worry about that.
Thx for lighting me :)
And sure my original question was for glut
If you can get the GLUT sources you can compile yourself a static library. Alternatively you can use FreeGLUT and compile with the FREEGLUT_STATIC flag.
i dont know from where i can find GLUT source, and even i dont know where to find the FreeGLUT
Google? Try "glut source" and "freeglut" as keywords...
Hint: It's the first link in both cases.
Google...
The problem with opengl32.dll is that it is specific for the users hardware Allthough Win9x->XP provides a basic software driver by default while Vista provides an OpenGL->D3D wrapper, so even without proper hardware things are likely to atleast work. (These basic drivers that come with the OS are normally replaced when you (or the computer manufacturer) installs the drivers for the graphicscard)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
opengl32.dll is never replaced when you install a driver.
The driver is actual another file.

opengl32.dll belongs to Windows. No one must touch it.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement