Compilation error during program fragment shader

try3.c: In function ‘main’:
try3.c:223: error: stray ‘\342’ in program
try3.c:223: error: stray ‘\200’ in program
try3.c:223: error: stray ‘\235’ in program
try3.c:223: error: stray ‘\342’ in program
try3.c:223: error: stray ‘\200’ in program
try3.c:223: error: stray ‘\235’ in program
try3.c:223: error: ‘texture’ undeclared (first use in this function)
try3.c:223: error: (Each undeclared identifier is reported only once
try3.c:223: error: for each function it appears in.)

I got this error. I dun know what is this error. Please help.
Here is the code:

static GLhandleARB programObject; // the program used to update
static GLhandleARB fragmentShader;
static GLint location; // a parameter to the fragment program
.
.
.
.
// Create the fragment program
fragmentShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
glShaderSourceARB(fragmentShader,1,&fragment_source,NULL);
glCompileShaderARB(fragmentShader);
glAttachObjectARB(programObject,fragmentShader);

  // Link the shader into a complete GLSL program.
  glLinkProgramARB(programObject);	
  glGetObjectParameterivARB(programObject,GL_OBJECT_LINK_STATUS_ARB,&progLinkSuccess);
  if (!progLinkSuccess){
		fprintf(stderr, "Filter shader could not be linked

");
exit(1);
}

// Get location of the sampler uniform
location = glGetUniformLocationARB(programObject, ”texture”);

And the error comes from line 223. Which is the glGetUniformLocationARB() functions there.

Anyone experience this error? Please help…

This is not an ASCII character 34 (aka: "). It is a Unicode character for a directional quotation mark. Unless your compiler is capable of compiling Unicode characters (or whatever character set you saved it in) in the particular encoding you saved it in, you’ll get errors.

Okay.Thanks…=D

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.