views:

26

answers:

1

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  A: 

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.

Hans Passant
Can't make it my source yet. I know nothing about OpenGL ES and the code has tons of stuff I don't understand (yet). For now I just want something to compile. But thanks. Any other idea?
snakile
So you changed that setting, used Build + Rebuild and get the exact same error? Right-click the project in the Solution Explorer window, Properties and try changing the setting again.
Hans Passant
No. I did it and got that error: WinMain function cannot be overloaded (I have only one WinMain function in my project - The one defined in the 'hello triangle' source)
snakile
Okey dokey, that's an entirely different problem. Please start a new thread for that, be sure to document your problem well with at least a snippet of your code. You can close this solved question by clicking the answer mark.
Hans Passant
@Hans Passant Thanks. Here's my new question: http://stackoverflow.com/questions/3497290/opengl-es-tutorial-winmain-function-cannot-be-overloadedI wanted to add a snippet of code but it's a 450 lines code which I don't understand, so I didn't put code in there. Are you sure I should close this thread?
snakile
Yes, I'm sure. Your question was answered.
Hans Passant