#include <GL/gl.h>
#include <GL/glaux.h>
#include "glos.h"void main(void)
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
auxInitPosition(0,0,500,500);
auxInitWindow("simple"); glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0,0.0,0.0);
glRectf(-0.5,-0.5,0.5,0.5); glFlush();
_sleep(1000);
}

解决方案 »

  1.   

    D:\Documents and Settings\llyzq\桌面\VC\opengl\opengl.cpp(14) : error C2601: 'ReSizeGLScene' : local function definitions are illegal
    D:\Documents and Settings\llyzq\桌面\VC\opengl\opengl.cpp(29) : error C2601: 'InitGL' : local function definitions are illegal
    D:\Documents and Settings\llyzq\桌面\VC\opengl\opengl.cpp(43) : fatal error C1004: unexpected end of file found
      

  2.   

    肯定是你的#include "glos.h"中有问题,你仔细的在查看一下这个头文件。首先是像错误提示中的两个函数,仔细看一下,另外,看是不是缺少分号或者是大括号什么的。不妨试一试。
      

  3.   

    o~~~ MY GOD...英文 搞不定啊