我想获得opengl版本,代码是:
#include "stdafx.h"
#include <GL/glut.h>
void main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowPosition(100,100);
glutInitWindowSize(400,300);
glutCreateWindow("OpenGL Version");
const char* version = (const char*)glGetString(GL_VERSION);
printf("OpenGL version:%s\n", version);
glutMainLoop();
}
但我得到了错误glutCreateWindow("OpenGL Version");
,谁能帮助我?