title: GCC, stringification, and inline GLSL?
body: <p>I'd like to declare GLSL shader strings inline using macro stringification:</p>
  
  <pre><code>#define STRINGIFY(A)  #A
  const GLchar* vert = STRINGIFY(
  #version 120\n
  attribute vec2 position;
  void main()
  {
      gl_Position = vec4( position, 0.0, 1.0 );
  }
  );
  </code></pre>
  
  <p>This builds and runs fine using VS2010 but fails to compile on <code>gcc</code> with:</p>
  
  <pre><code>error: invalid preprocessing directive #version
  </code></pre>
  
  <p>Is there a way to use stringification like this in a portable manner?  </p>
  
  <p>I'm trying to avoid per-line quotes:</p>
  
  <pre><code>const GLchar* vert = 
  "#version 120\n"
  "attribute vec2 position;"
  "void main()"
  "{"
  "    gl_Position = vec4( position, 0.0, 1.0 );"
  "}"
  ;
  </code></pre>
  
  <p>...and/or line continuation:</p>
  
  <pre><code>const GLchar* vert = "\
  #version 120\n                                 \
  attribute vec2 position;                       \
  void main()                                    \
  {                                              \
      gl_Position = vec4( position, 0.0, 1.0 );  \
  }                                              \
  ";
  </code></pre>