1
votes

I'm trying to learn OpenGL ES with the "OpenGL ES Training Course" (An OpenGL ES tutorial). I use OPENGL-ES 1.1 WINDOWS PC EMULATION with visual studio 2010. I'm trying to comile the 'hello triangle' program and get 9 warnings and an error:

The warnings:

#include <stdio.h> skipped when looking for precompiled header use
#include <TCHAR.h> skipped when looking for precompiled header use
#include <GLES/gel.h> skipped when looking for precompiled header use
#include <GLES/gl.h> skipped when looking for precompiled header use
VERTTYPE: macro redefinition
VERTTYPENUM: macro redefinition
myglLoadMatrix: macro redefinition
myglClearColor: macro redefinition

The error: unexpected end of file while looking for precompiled header. Did you forget to add #include "stdAfx.h" to your source?

(I didn't forget to add nothing to my source. It's not my source, it's a hello world example).

1
Either disable precompiled headers or do what it tells you to do, which is add #include stdafx.h to your source.5ound
@5ound I tried to add '#include stdafx.h' and got some warnings and an error: WinMain function cannot be overloaded. How to disable precompiled headers?snakile

1 Answers

1
votes

Well, don't hesitate to make it your source, that's how most programs get started.

If you prefer slow build times then use Project + Properties, C/C++, Precompiled headers, Create/Use = Not. Look around a bit to get the lay of the land. Press F1 if something looks mysterious.