Reputation: 4022
I've tried following the instructions giving by: http://glew.sourceforge.net/install.html but nothing seems to work. First it says to install the files as follows:
bin/glew32.dll to %SystemRoot%/system32
lib/glew32.lib to {VC Root}/Lib
include/GL/glew.h to {VC Root}/Include/GL
include/GL/wglew.h to {VC Root}/Include/GL
but below that it says to "install glew.h, glew32.lib, and glew32.dll / libGLEW.so to where the OpenGL equivalents gl.h, opengl32.lib, and opengl32.dll are located."which for me is in another folder.
Just in case i put the files in both locations. In my project properties then go to linker->input add glew32.lib, glu32.lib, and opengl32.lib to Additional Dependencies. The project wont compile. I get repeated error "LNK2019: unresolved external symbol".
I've tried adding the static glew32s.lib file to my project and including the glew.h and glew.c and using #define GLEW_STATIC, that doesnt work either, same error.
What am i doing wrong?
Upvotes: 3
Views: 4769
Reputation: 9326
If you are building it statically, you don't need to add glew32.lib to your project (which is probably what is causing the errors). All you need to do is add glew.c, glew.h and wglew.h to your project; then before you include glew, define GLEW_STATIC:
#define GLEW_STATIC
#include "glew.h"
Upvotes: 6