Unexpected end of file - Precompiled header

nobody wrote on Tuesday, July 05, 2005:


I’ve just installed GLFW and are trying the examples.

Method 1: Works!
cl lesson01.c glfw.lib opengl32.lib glu32.lib user32.lib

Method 2 - Use the IDE: - Doesn’t work!
Create a new empty ‘Win32 Application’ or ‘Win32 Console Application’ project
Add the program source (e.g. lesson01.c) to the project (Project->Add To Project->Files…)
Under Project Settings, in the Link section, add “glfw.lib opengl32.lib glu32.lib” to “Object/library modules” (at the beginning of the line)
If you are building a ‘Win32 Application’, select ‘Output’ for Category in the Link section, and type mainCRTStartup in “Entry-point symbol”

Here is the msg:
c:\glfw\examples-tutorial\src\lesson01\lesson01.c(112) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

les00.exe - 1 error(s), 0 warning(s)

Please advise.


melekor wrote on Tuesday, July 05, 2005:

This has nothing to do with GLFW. That error message is generated when the compiler finds a file which doesn’t #include your precompiled header. To fix it, you need to either disable the precompiled header option, or add the proper #include to every source file in the project.