急 !! mingw下glut的配置问题
我提前已经装好了mingw,按照网上的方法,将glut.h放在include\GL目录下,将glut32.dll和glut32.lib放在工程目录下,测试程序为#incl...
我提前已经装好了mingw,按照网上的方法,将glut.h放在include\GL目录下,将glut32.dll和glut32.lib放在工程目录下,测试程序为
#include <GL/glut.h>
#define _STDCALL_SUPPORTED
#define _M_IX8
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
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();
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutCreateWindow("Hello,world!");
glutDisplayFunc(display);
glutMainLoop();
}
结果编译提示
求大神解救 展开
#include <GL/glut.h>
#define _STDCALL_SUPPORTED
#define _M_IX8
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
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();
}
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutCreateWindow("Hello,world!");
glutDisplayFunc(display);
glutMainLoop();
}
结果编译提示
求大神解救 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询