Results 1 to 3 of 3

Thread: Compile: "ERROR: Missing main()" but spec says linking L0009

  1. #1
    Junior Member
    Join Date
    Jul 2011

    Compile: "ERROR: Missing main()" but spec says linking L0009


    Sorry about the subject, couldn't fit all of the description. The problem i'm having is that i get the error "ERROR: Missing main()" when i'm trying to compile one of the shader objects . It doesn't have a main because it's a library that i add to my program along with other shader objects that do have main functions.

    My idea was that GLES might not support this as OpenGL does, but according to the shader specs at ... nguage.pdf there is a link error "L0009: Missing main function for shader." and no compile error defined.

    I'm running WebGL but i thought it was more relevant to GLES as it is a shader issue.

    The computer is running Ubuntu 11.04 something, and glxinfo gives:

    Code :
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: Quadro FX 1600M/PCI/SSE2
    OpenGL version string: 3.3.0 NVIDIA 290.10
    OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

    I'm running Chrome 17.0.963.26 dev

    Thanks in advance

  2. #2
    Junior Member
    Join Date
    Jul 2011

    Re: Compile: "ERROR: Missing main()" but spec says linking L

    Hmm, i guess that when i think about it it makes sense. Since the GLES GLSL does not support branching as i've understood it's logic that it doesn't allow libraries as shader objects because there would be no way of calling them..

    But it's still weird that the spec says it's a linker error (as it would be in OpenGL non-ES though)!

  3. #3
    Senior Member
    Join Date
    May 2006

    Re: Compile: "ERROR: Missing main()" but spec says linking L

    Quote Originally Posted by The OpenGL ES Shading Language, version 1.00, revision 17, p. 54
    The function main is used as the entry point to a shader. Both the vertex shader and fragment shader must contain a function named main.
    OpenGL ES 2.0 does not support linking of multiple shader objects for the same shader stage. Thus a shader object without main would be of no use.

    GLSL ES does support branching and function calls.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

Similar Threads

  1. Replies: 1
    Last Post: 11-21-2012, 04:22 PM
  2. "required extension" and "core addition"
    By wycwang in forum OpenGL ES
    Replies: 2
    Last Post: 09-19-2007, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean