Hi,
I tryed to start a new project with OpenGL on VC++ 2010. But I don't get my project working and there is always the same error message.
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <Windows.h>
#include "textReader.h"
int screenX=GetSystemMetrics(SM_CXSCREEN)-100;
int screenY=GetSystemMetrics(SM_CYSCREEN)-100;
static void RenderSceneCB()
{
glClear(GL_COLOR_BUFFER_BIT);
glutSwapBuffers();
}
static void InitializeGlutCallbacks()
{
glutDisplayFunc(RenderSceneCB);
}
static void AddShader(char* shaderDir, GLenum Shadertype)
{
GLuint shaderID = glCreateShader(Shadertype);
TextReader shader = TextReader(shaderDir);
glShaderSource(shaderID, shader.getCount(), (const GLchar**) shader.getContent(), shader.getLength());
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA);
glutInitWindowSize(screenX,screenY);
glutInitWindowPosition(50, 15);
glutCreateWindow("OpenGL - The Beginning");
InitializeGlutCallbacks();
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
AddShader("vert.VERT-DATEI",GL_VERTEX_SHADER);
glutMainLoop();
return 0;
}
The following message occured:
1>main.obj : error LNK2001: unresolved external symbol "__imp____glewShaderSource".
1>main.obj : error LNK2001: unresolved external symbol "__imp____glewCreateShader".
I can't figure out where the error is. I linked to
C:\GL\lib\glew32.lib
C:\GL\lib\freeglut.lib
and think I included all filed I need.