title: glCreateShader is crashing
body: <p>I should have the newest version of Glew and Glut so that shouldn't be the problem.  Everything should be linked, and I'm using MS visual studio 2010.
  My program compiles but when I get to glCreateShader(GL_FRAGMENT_SHADER) it show an error: "0xC0000005: Access violation."</p>
  
  <p>my program:</p>
  
  <pre><code>#include &lt;GL\glew.h&gt;
  #include &lt;GL\glut.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  GLuint program;
  
  static char* readShaderSource(const char * shaderFile)
  {
      FILE* fp = fopen(shaderFile, "r");
      char* buf;
      long size;
  
      if (fp == NULL) return NULL; 
      fseek(fp, 0L, SEEK_END);//go to end
      size = ftell(fp);       //get size
      fseek(fp, 0L, SEEK_SET);//go to begining
  
      buf = (char*) malloc((size +1) * sizeof(char));
      fread(buf, 1, size, fp);
      buf[size] = NULL;
      fclose(fp);
      return buf;
  }
  
  static void initShader(const GLchar * fsFile)
  {
      GLint status;
      GLchar * fSource;
      GLuint fShader;
      GLuint fShader2;
  
      //read file
      fSource = readShaderSource(fsFile);
      if (fSource == NULL)
      {
          printf("Fail to load file");
          exit(EXIT_FAILURE);
      }
  
      //Create program and shader object
      fShader2 = glCreateShader(GL_VERTEX_SHADER);
      fShader = glCreateShader(GL_FRAGMENT_SHADER);
      program = glCreateProgram();
  
      //Attach shaders to program
      glAttachShader(program, fShader);
  
      //read shaders
      glShaderSource(fShader, 1, (const GLchar**) &amp;fSource, NULL);
  
      //compile fragment shader
      glCompileShader(fShader);
  
      //error check
      glGetShaderiv(fShader, GL_COMPILE_STATUS, &amp;status);
      if (status == GL_FALSE)
      {
          printf("Failed to compile the fragment shader.");
          exit(EXIT_FAILURE);
      }
  
      //link and error check
      glLinkProgram(program);
      glGetProgramiv(program, GL_LINK_STATUS, &amp;status);
      if (status == GL_FALSE)
      {
          printf("program error");
          exit(EXIT_FAILURE);
      }
  
      //use program object
      glUseProgram(program);
  
      //set up uniform parameter
      //skipped for now
  }
  
  int main(int argc, char ** argv)
  {
      glutInit(&amp;argc, argv);
      glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
      glutInitWindowSize(500,500);
      glutCreateWindow("Matrix Fractal");
      glClearColor(1.0, 1.0, 1.0, 1.0);
      gluOrtho2D(0.0,0.0,(GLfloat) 500, (GLfloat) 500);
  
      glutDisplayFunc(draw);
      glutReshapeFunc(reshape);
  
      initShader("fsFractal.glsl");
  
      glutMainLoop();
  }
  </code></pre>