GLEW 64bit win7 shader problem

Started by
2 comments, last by V-man 13 years, 10 months ago
I have an OpenGL/GLEW project working fine on my main PC running XP 32bit with some simple shaders. I tried to get it working on my laptop running 64bit Win7 and it all goes wrong.

If I download and install glew 32bit on my laptop the app runs but with no shaders but no errors.

If I use the 64bit glew I get these compile errors:

error LNK2019: unresolved external symbol __imp__glewInit

Its almost as if glew32.lib just doesn't contain the function definitions in the 64bit download. I've tried running it static, older versions and tried mixing and matching the two downloads.

I don't know if there is something wrong with my code or something wrong with my installation. I take it I should be using the 64bit GLEW?

My laptop runs OpenGL with shaders normally. I am totally stumped!?
Advertisement
I'm using GLEW on 64-bit Windows 7 too. I just upgraded my OpenGL implementation, and drivers about a month ago. What I ended up having to do was put glew32.dll in my Windows/system folder --not System32 oddly enough. Also, you need to go to the menu: Project->Properties->Config Properties->Linker->Input, and add glew32.lib (NOT .dll) to "Additional Dependencies". Also make sure that glew32.lib is in one of your lib directories. I put glew32.lib in the same directory as glut32.lib to make things easier. That may solve your problems.

You could not use shaders? What happens when you try using shaders? Do your drivers not support them at the moment, or do you get unresolved external errors when you try to build your project with shader functionality? If the it is due to unresolved externals, it is because the lib is not setup correctly. All your fixed-function OpenGL code works because it is supported by OpenGL32.lib/dll which glut automatically loads and includes into your project if you are using GLUT.
I actually downloaded the binaries and linked the glew project into mine. It compiles fine but the shaders aren't working and its just rendering the basic geometry. I'm wondering if its a different problem...
Quote:shaders aren't working

Which means what? The shaders don't compile? What does the shader error log say?
What does this have to do with glew?
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