PDA

View Full Version : Compiler error



Tomy
09-28-2005, 09:56 PM
Hello everybody,

When I compile my shader program, I get this compiler error I cannot understand:

(0)error C0000: syntax error, unexpected $end at token "<invalid atom>"
(1)error C0501: type name expected at token "<invalid atom>"

Can anybody give me a clue for the reason of this error?

Thank you.

Relic
09-28-2005, 10:06 PM
Sounds like your input string to the glShaderSource function has ended before the compiler could finish parsing.
Check the input string and length.
Check if you have a NULL character where it doesn't belong.
Try a glGetShaderSourceARB to see if it returns the same as what you've wanted.
If you loaded the shader from a file, check the loader (read binary?).

Tomy
09-28-2005, 11:50 PM
Thank you Relic... my mistake...I put a // comment beside a line of code which was not terminate with with a newline character! :eek: