I am learning OpenGL by following the Redbook.
When I come to around page 90, I need use glGenBuffers()
;
Then I need to install "glew".
By following the steps in here.
I download glew.zip
from glew.sourceforge.net/
and unpack the files.
I put
glew.h
in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
glew32.lib
in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
, andglew32.dll
in C:\Windows\System32
After that, I build my project in VS 2010 and in Linker->input
, I add dependencies glew32.lib
.
But when I build it, I have an error:
unresolved external symbol __imp__glewInit
Since it's not mentioned already, my problem was that I was linking against the static version of glew (glew32s.lib), but I hadn't defined the GLEW_STATIC
preprocessor symbol (so the header I was compiling against effectively didn't match the library I was linking against).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With