View Full Version : Glew 1.7.0 - unresolved external symbol glewInit()

01-13-2012, 08:03 PM

I am woring on window 7(64bit) with Intel graphics 3000.I have installed glew1.7.0.

I have installed as per the directions in glew website.

glew32.dll in system32 folder.

glew32.lib in C:\ProgramFiles\MicrosoftSDKs\Windows\v6.0A\lib
glew.h and wglew.h in C:\ProgramFiles\MicrosoftSDKs\Windows\v6.0A\Includ e\GL

void main()
int i;


I am getting a linker error
unresolved external symbol _glewInit referenced in function _main

How do i solve this?

Alfonse Reinheart
01-13-2012, 09:29 PM
Did you actually link with the glew32.lib library?

01-14-2012, 06:13 AM

I have linked to glew32.lib.Linker->Input->Additional Dependencies ,in additional dependencies i have given the path to the glew32.lib file.

01-16-2012, 06:04 AM
I never tried what you did but I think you're supposed to provide the MSVC compiler with the search paths in Linker->General->Additional Library Directories and only put "glew32.lib" in Additional Dependencies.

I think your linker is trying to find a file named with the complete path which isn't going to work.

01-17-2012, 06:23 AM

I solved the problem.Actually i had downloaded glew 64 bit version.I downloaded the 32 bit version it worked.
Thankyou very much for your support.

02-02-2012, 08:27 AM
I have a similar problem. I use Visual Studio 2010 and I can't make it link glew statically.

I include glew.h at first position
#include <GL/glew.h>
from the correct folder
and add the according properties:
C/C++ / General / Additional Include Directories

C/C++ / General / Preprocessor

Linker / General / Additional Include Directories

I get a lot of LNK2001 errors:
Error 4 error LNK2001: unresolved external symbol ___glewBindBuffer <<path>>\OpenGLTest.obj

Dynamic linking works. When I remove the preprocessor directive and put glew32.dll to the exe folder it works. But I want to link it statically.

I hope anybody can help me.

Alfonse Reinheart
02-02-2012, 10:11 AM
When I remove the preprocessor directive and put glew32.dll to the exe folder it works.

That shouldn't be possible. The static version of GLEW (which I assume you built) is not the same library as the import library version of GLEW.

So if this is happening, it is because you're still linking to the import library, not the static library. It's a bit confusing since they both have the ".lib" suffix. But they're different libraries with different symbols in them.

02-02-2012, 10:28 AM
Thank you for the fast response.
Yes, I indeed was using glew32.lib instead of glew32s.lib.