title: Error compiling GLSL shader in linux
body: <p>I recently wrote a basic rendering engine using OpenGL on my Windows machine, everything runs fine on that end.  Unfortunately when I attempted to bring it over onto my laptop which is running Ubuntu 12.04 there were some complications, initially the linking settings and libraries were the problem but I managed to sort all that out, my current problem is with compiling the GLSL shaders, when I compile both the vertex and fragment shaders I get the following error.</p>
  
  <p>'0:2(14): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE<br>
  '</p>
  
  <p>This is the code from my vertex shader.</p>
  
  <pre><code>#version 330 core
  
  layout(location = 0) in vec3 position;
  layout(location = 1) in vec2 uv;
  layout(location = 2) in vec3 normal;
  
  struct DirectionalLight{
      vec3 direction;
      vec3 color;
      vec3 ambient;
  };
  
  uniform mat4 modelMatrix;
  uniform mat4 viewMatrix;
  uniform mat4 projectionMatrix;
  uniform DirectionalLight dLight;
  
  out vec2 iUv;
  out vec3 iPosition;
  out vec3 iNormal;
  out vec3 lightDir;
  
  void main()
  {
      iUv = uv;
      iPosition = vec3(viewMatrix * modelMatrix * vec4(position,1));
      iNormal = normal;
      lightDir = vec3(normalize(viewMatrix * vec4(dLight.direction, 0)));
  
      gl_Position =  projectionMatrix * viewMatrix * modelMatrix * vec4(position,1);
  }
  </code></pre>
  
  <p>Any ideas?</p>