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
Started by D.V.D, Aug 20 2012 12:35 PM
5 replies to this topic
Sponsor:
#3 Members - Reputation: 268
Posted 20 August 2012 - 06:16 PM
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]
#4 Members - Reputation: 1031
Posted 20 August 2012 - 10:34 PM
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.
Learn to make games with my SDL Tutorials.
Transition from OpenGL 2 to modern OpenGL using my OpenGL Tutorial.
Transition from OpenGL 2 to modern OpenGL using my OpenGL Tutorial.
#6 Members - Reputation: 785
Posted 22 August 2012 - 01:29 PM
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);






