http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

including windows.h did not work.



============================================================
"Before myTopica, I was buried in an avalanche of email.
Now, thanks to this free solution, I am on top of my inbox."
Get rescued at
http://click.topica.com/caaabBBbUrGczbU68iFa/register
============================================================

Date: Fri, 27 Apr 2001 11:13:44 +0200
From: "Christian Gyrling" <d98chgy@stud.hh.se>
Subject: Re: OpenGl Problem.


Hi Nayan

You also need to include windows.h to make it all work. Something
with OpenGL.... =)
Also the glx is for Unix systems i belive. In windows environments
its <glaux.h> also your main function should return a value or
you should write "void main()" to tell the compiler that main will not
return a value. Otherwise the compiler assume an int as a return value.

/Christian

----- Original Message -----
From: "nayan" <nayans@rediffmail.com>
To: <gameprogrammer@topica.com>
Sent: Friday, April 27, 2001 10:13 AM
Subject: OpenGl Problem.


> --- Sponsor's Message --------------------------------------
> Does Windows ME Work for You?
> Tell it to the list! Join our special technology discussion.
> http://click.topica.com/caaaa4JbUrGczbU6XK0a/technology
> ------------------------------------------------------------
>
> hi all,
>
> I have just started learning OpenGL and the following program did not
compile in VC++ 6 Entrepise Edition.
>
> #include <GL/gl.h>
> #include <GL/glu.h>
> #include <GL/glx.h>
>
> main() {
>
>    OpenAWindowPlease();
>
>    glClearColor(0.0, 0.0, 0.0, 0.0);
>    glClear(GL_COLOR_BUFFER_BIT);
>    glColor3f(1.0, 1.0, 1.0);
>    glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
>    glBegin(GL_POLYGON);
>       glVertex2f(-0.5, -0.5);
>       glVertex2f(-0.5, 0.5);
>       glVertex2f(0.5, 0.5);
>       glVertex2f(0.5, -0.5);
>    glEnd();
>    glFlush();
>
>    KeepTheWindowOnTheScreenForAWhile();
> }
>
> and i got the following error
> Compiling...
> sample.cpp
> d:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2144: syntax error : missing ';' before type 'void'
> d:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2501: %2

_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com




==^================================================================
EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrGcz.bU68iF
Or send an email To: gameprogrammer-unsubscribe@topica.com
This email was sent to: list@pendleton.com

T O P I C A  -- Learn More. Surf Less.
Newsletters, Tips and Discussions on Topics You Choose.
http://www.topica.com/partner/tag01
==^================================================================