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
GLEW not installing properly
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]
[source lang="cpp"]#pragma once
#include <glew.h>
#pragma comment(lib, "glew32.lib")
#pragma comment(lib, "opengl32.lib")[/source]
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement