• Advertisement
Sign in to follow this  

GLEW not installing properly

This topic is 1980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I installed GLEW and put the files where the website told me to do but when I run my project, I get these errors:

1>main.obj : error LNK2001: unresolved external symbol __imp____glewDisableVertexAttribArray
1>main.obj : error LNK2001: unresolved external symbol __imp____glewVertexAttribPointer
1>main.obj : error LNK2001: unresolved external symbol __imp____glewBindBuffer
1>main.obj : error LNK2001: unresolved external symbol __imp____glewEnableVertexAttribArray
1>main.obj : error LNK2019: unresolved external symbol __imp__glewGetErrorString@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol __imp____glewBufferData
1>main.obj : error LNK2001: unresolved external symbol __imp____glewGenBuffers

This is where I put my files:

bin/glew32.dll to system 32
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

Share this post


Link to post
Share on other sites
Advertisement
No I put these few lines of code in and it seemed to work however I'm not really sure what they do. Can I link GLEW without them?

[source lang="cpp"]#pragma once

#include <glew.h>
#pragma comment(lib, "glew32.lib")

#pragma comment(lib, "opengl32.lib")[/source]

Share this post


Link to post
Share on other sites

No I put these few lines of code in and it seemed to work however I'm not really sure what they do. Can I link GLEW without them?

[source lang="cpp"]#pragma once

#include <glew.h>
#pragma comment(lib, "glew32.lib")

#pragma comment(lib, "opengl32.lib")[/source]


It's basically a way of linking a library in code.

To do it from the IDE, you just add them in the additional dependencies field in your project properties.

Share this post


Link to post
Share on other sites
http://www.opengl.org/wiki/FAQ#Unresolved_External_Symbol

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement