problem with glGenBuffersARB

i use VS 2010 and when i execute the program, console window stops working. so i executed in debug mode and the break is hit at this line

glGenBuffersARB(1, &pbo);

here is the code snippet

GLuint pbo;
glGenBuffersARB(1, &pbo);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo);
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, widthheightsizeof(GLubyte)*4, myimage, GL_STREAM_DRAW_ARB);
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);

i have put glew version 1.5, copied the dll, header, lib files in the right places. i have no compilation errors at all.

i just dont understand whats wrong. PLEASE HELP…

Do you correctly initialize glew (and does the init succeed)?
Do you (successfully) create an OpenGL context before the posted snippet and is the context active at that point in the code?
Does the context support the extension you are trying to use (e.g. ARB_vertex_buffer_object)?

ok i didnt know about glewinit, i googled it and added this code to my code

GLenum err = glewInit();
if (GLEW_OK != err)
{
fprintf(stderr, "your error is : %s
", glewGetErrorString(err));
}
fprintf(stdout, "Status: Using GLEW %s
", glewGetString(GLEW_VERSION));

and in the output i am getting

your error is: missing GL version
status: using GLEW 1.5.7

and in the watch tab the error given is

glGenBuffersARB CXX0017: Error: symbol “glGenBuffersARB” not found

Do you (successfully) create an OpenGL context before the posted snippet and is the context active at that point in the code?

no i havent created any context. and what should i do know.

You should read any tutorial on creating an OpenGL rendering context. glewInit() is called once the context is created, not before. The OpenGL wiki has an example of how to create a context with SDL.