|
我将如下代码copy到一个vc的workspace
添加 "opengl32.lib glu32.lib glaux.lib" 到project>settings>link
执行错误:
error C2144: syntax error : missing ';' before type 'void'
error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
#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);
}
请知道答案的朋友赐教! 谢谢 |
|