Shader runtime error

Hello my program compiles and and runs in ATI, but with NVIDIA, I get the following error

"error C0000,syntax error, unexpected $undefined at token “<undefined>”
I understand something with reading shader files in NVIDIA.

My readfile program is as follows:

static const GLchar* ReadTextFile(const char* filename)
{
FILE* infile;

fopen_s(&infile, filename, “r”);

if (!infile) {
std::cerr << “Unable to open file '” << filename << “’” << std::endl;
return NULL;
}

fseek(infile, 0, SEEK_END);
int len = ftell(infile);
fseek(infile, 0, SEEK_SET);

GLchar* source = new GLchar[len + 1];

fread(source, 1, len, infile);
fclose(infile);

source[len] = 0;

return const_cast<const GLchar*> (source);
}

Could any one help me figure out what the problem is?

Thanks in advance.

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