Hey all,
I was stumbling around for a solution to this problem and found one accidentally. Typically this error only shows up when you mismatch your #if/#endif statements and is an easy fix.
But what if all your #if/#endif pairs are matched? I see a lot of people with this problem and it seems to stem from hidden characters in the pre-compiler code. This happens when you download or use a class/struct/file that you didn't write from scratch in your compiler. During the transfer, some bits were corrupted or modified.
My situation arose when I downloaded glutMaster.cpp and the file was saved as glutMaster (with no extension). I added .cpp and then produced my #if/#endif error.
SOLUTION: Open your corrupt files with word pad or text editor. Copy the entire code, then past it into a new file and save over your original corrupt files. Try again. If nothing changes, well, keep looking for a solution and post it when you find it.
- Miles