I'm trying to use glew so that I can write to framebuffers. Even though I include glew.h, trying to use glew functions causes an error.
important parts of code:
#include <GL\glew.h>
#include <GL\glut.h>
#include <Cg\cgGL.h>
#pragma comment(lib, "glew32.lib")
#pragma comment(lib, "cg.lib")
#pragma comment(lib, "cggl.lib")
int err = glewInit(); // works fine
if (GLEW_OK != err) exit(-1);
GLuint fb;
glGenFramebuffersEXT(1, &fb); // causes error
can anyone help me?



