|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: OpenGl Problem.
============================================================ Slim down your email inbox. And firm up your newsletter flow with My Topica's email newsletter organizer. It's free of charge, free of calories. No dieting required! http://click.topica.com/caaabDkbUrGczbU68iFa/register ============================================================ 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: 'WINGDIAPI' : missing storage-class or type specifiers > d:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found > Error executing cl.exe. > > i think there is problem with the header file becasue Borland c++ also gave me some error regarding the Header file can Anyone tell me the remedy for the situation. > > Regards > Nayan > > _____________________________________________________ > 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 ==^================================================================
|
|