|
|
#include<GL/gl.h>
#include<GL/glu.h>
#include<GL/glaux.h>
#include<stdlib.h>
void myinit()
{
glClearColor(0,0,0);
}
void CALLBACK display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor4f(0.2,0.6,1.0,1.0);
glRotate(60,1,1,1);
auxWireCube(1.0);
glFlush();
}
void myReshape(GLsizei w,GLsizei h)
{
glViewport(0,0,w,h);
}
void main()
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
auxInitPosition(0,0,400,400);
auxInitWindow("ss");
myinit();
auxReshapeFunc(myReshape);
auxMainLoop(display);
}
错误提示:
Compiling...
f.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
执行 cl.exe 时出错.
系统是XP,开发环境是VC++6.0,集成显卡 [em7] |
|