I've google this a little bit and I can't figure out what is wrong. My shader:

#version 120

attribute vec2 coord2d;
void main(void) 
{
    gl_Position = vec4(coord2d, 0.0, 1.0);
}

This shader I know works, but when I try to link the program I get:

glLinkProgram:Vertex info
-----------
0(3) : error C1013: function "main" is already defined at 0(4)

I've checked to make sure that the viles are getting into memory properly and what not. they compile just fine. it is the linking step that something goes wrong. I'm clueless as to what and I've been hitting my head on this for quite some time. any tips?

Edit:

Here is the code i use to create the shader. it gets all the way to the conditional, it actually completes execution entirely, but the log prints out what you saw above.

GLuint updateProg()
{
    prog = glCreateProgram();
    if (vs == 0 || fs == 0) return 0;
    glAttachShader(prog, vs);
    glAttachShader(prog, fs);
    int link_ok;
    glLinkProgram(prog);
    glGetProgramiv(prog, GL_LINK_STATUS, &link_ok);
    if (!link_ok) 
    {
        fprintf(stderr, "glLinkProgram:");
        print_log(prog);
        return 0;
    }
    return prog;
}
Edit
Report