这段代码有问题吗,为什么会报错??我已经添加opengl32.lib glu32.lib glaux.lib了
// newgl.cpp : Defines the entry point for the console application.
// opengl32.lib glu32.lib glaux.lib
#include "stdafx.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glaux.h>
#include <stdio.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glLoadIdentity();
glTranslatef(0.0,0.0,-5.0);
glScalef(1.0,2.0,1.0);
auxWireCube(1.0);
glFlush();
}
void myinit(void)
{
glShadeModel(GL_FLAT);
}
void myReshape(int w,int h)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0,1.0,-1.0,1.0,1.5,20.0);
glMatrixMode(GL_MODELVIEW);
glViewport(0,0,w,h);
}
int main(int argc,char** argv)
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGB);
auxInitPosition(0,0,500,500);
auxInitWindow(argv[0]);
myinit();
auxReshapeFunc(myReshape);
auxMainLoop(display);
}