Hello every body,
I have installed GLEW from source forge and trying to compile a GLSL porgram on Microsoft Visual Studio 10.0. But i am getting the following errors:
/************************************************** ****/
Generating Code...
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewUseProgram
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewLinkProgram
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewAttachShader
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewCreateProgram
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewCompileShader
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewShaderSource
1>ogl.obj : error LNK2001: unresolved external symbol __imp____glewCreateShader
1>ogl.obj : error LNK2019: unresolved external symbol __imp__glewIsSupported@4 referenced in function _main
1>ogl.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _main
1>C:\Users\MYG741\Documents\Visual Studio 2010\Projects\Shader\Debug\Shader.exe : fatal error LNK1120: 9 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.84
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

/************************************************** ***/
Here is my code downloaded from lighthouse3D website:

Code :
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
 
#include <GL/glew.h>
#include <GL/glut.h>
#include "textfile.h"
 
 
GLuint v,f,f2,p;
float lpos[4] = {1,0.5,1,0};
 
void changeSize(int w, int h) {
 
    // Prevent a divide by zero, when window is too short
    // (you cant make a window of zero width).
    if(h == 0)
        h = 1;
 
    float ratio = 1.0* w / h;
 
    // Reset the coordinate system before modifying
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
 
    // Set the viewport to be the entire window
    glViewport(0, 0, w, h);
 
    // Set the correct perspective.
    gluPerspective(45,ratio,1,1000);
    glMatrixMode(GL_MODELVIEW);
 
 
}
 
 
void renderScene(void) {
 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
    glLoadIdentity();
    gluLookAt(0.0,0.0,5.0, 
              0.0,0.0,-1.0,
              0.0f,1.0f,0.0f);
 
    glLightfv(GL_LIGHT0, GL_POSITION, lpos);
    glutSolidTeapot(1);
 
    glutSwapBuffers();
}
 
void processNormalKeys(unsigned char key, int x, int y) {
 
    if (key == 27) 
        exit(0);
}
 
 
void setShaders() {
 
    char *vs = NULL,*fs = NULL,*fs2 = NULL;
 
    v = glCreateShader(GL_VERTEX_SHADER);
    f = glCreateShader(GL_FRAGMENT_SHADER);
    f2 = glCreateShader(GL_FRAGMENT_SHADER);
 
 
    vs = textFileRead("toon.vert");
    fs = textFileRead("toon.frag");
    fs2 = textFileRead("toon2.frag");
 
    const char * ff = fs;
    const char * ff2 = fs2;
    const char * vv = vs;
 
    glShaderSource(v, 1, &vv,NULL);
    glShaderSource(f, 1, &ff,NULL);
    glShaderSource(f2, 1, &ff2,NULL);
 
    free(vs);free(fs);
 
    glCompileShader(v);
    glCompileShader(f);
    glCompileShader(f2);
 
    p = glCreateProgram();
    glAttachShader(p,f);
    glAttachShader(p,f2);
    glAttachShader(p,v);
 
    glLinkProgram(p);
    glUseProgram(p);
}
 
 
int main(int argc, char **argv) {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowPosition(100,100);
    glutInitWindowSize(320,320);
    glutCreateWindow("MM 2004-05");
 
    glutDisplayFunc(renderScene);
    glutIdleFunc(renderScene);
    glutReshapeFunc(changeSize);
    glutKeyboardFunc(processNormalKeys);
 
    glEnable(GL_DEPTH_TEST);
    glClearColor(1.0,1.0,1.0,1.0);
//    glEnable(GL_CULL_FACE);
 
    glewInit();
    if (glewIsSupported("GL_VERSION_2_0"))
        printf("Ready for OpenGL 2.0\n");
    else {
        printf("OpenGL 2.0 not supported\n");
        exit(1);
    }
    setShaders();
 
    glutMainLoop();
 
    // just for compatibiliy purposes
    return 0;
}

Could anyone help me identify the problem?

I put glew.h file and lib and dll in the proper directories. Why still I am getting problem? Please help me out.