Jump to content

  • Log In with Google      Sign In   
  • Create Account


GLEW not installing properly


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 D.V.D   Members   -  Reputation: 411

Like
0Likes
Like

Posted 20 August 2012 - 12:35 PM

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

Sponsor:

#2 Sponji   Members   -  Reputation: 1147

Like
0Likes
Like

Posted 20 August 2012 - 03:15 PM

And did you link the glew32.lib with your project?
Derp

#3 D.V.D   Members   -  Reputation: 411

Like
0Likes
Like

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]

#4 Lazy Foo   Members   -  Reputation: 1103

Like
1Likes
Like

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.

#5 D.V.D   Members   -  Reputation: 411

Like
0Likes
Like

Posted 21 August 2012 - 08:28 PM

Ah got it. Thanks for the help :)

#6 V-man   Members   -  Reputation: 801

Like
0Likes
Like

Posted 22 August 2012 - 01:29 PM

http://www.opengl.org/wiki/FAQ#Unresolved_External_Symbol
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);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS