I'm using MSVC 2008. I can compile and run projects using Glut without issue. Now I am trying to include Glew. This is what I have done:
1) Downloaded the latest version of Glew from
http://glew.sourceforge.net/install.html
2) Installed glew files into the following (recommended) directories:
C:\Windows\System32\glew32.dll
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\glew32.lib
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\glew32s.lib
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\glew.h
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\glexw.h
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\wglew.h
3) Added the following as Additional Dependencies under Linker Input,
opengl32.lib glu32.lib glut32.lib glew32.lib glew32s.lib
4) #include <GL/glew.h> before glut
When I compile, it still says:
1>Compiling...
1>main.cpp
1>Note: including lib: glut32.lib
1>Linking...
1>main.obj : error LNK2001: unresolved external symbol __imp__glewInit
1>main.obj : error LNK2001: unresolved external symbol __imp__glewGetString
1>main.obj : error LNK2001: unresolved external symbol __imp__glewGetErrorString
So...why aren't the libraries getting linked in?
Glew linker errors
Are you sure you're supposed to include glew32 and glew32s at the same time? I think one is for static and the other is for dynamic linking, I think you have to pick whether you want static or dynamic linking and go with that lib only.
I don't know if doubly including those would cause your error, but it seems incorrect.
Try just glew32.lib, with no preprocessor commands (those are only needed if you include glew.c in your project from my understanding).
I don't know if doubly including those would cause your error, but it seems incorrect.
Try just glew32.lib, with no preprocessor commands (those are only needed if you include glew.c in your project from my understanding).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement