求教为什么会出现这样连接错误
1>GLMetaseq.obj : error LNK2001: unresolved external symbol "void (__stdcall* glDeleteBuffersARB)(int,unsigned int const *)" (?glDeleteBuffersARB@@3P6GXHPBI@ZA)
1>GLMetaseq.obj : error LNK2001: unresolved external symbol "void (__stdcall* glBufferDataARB)(unsigned int,int,void const *,unsigned int)" (?glBufferDataARB@@3P6GXIHPBXI@ZA)
1>GLMetaseq.obj : error LNK2001: unresolved external symbol "void (__stdcall* glBindBufferARB)(unsigned int,unsigned int)" (?glBindBufferARB@@3P6GXII@ZA)
1>GLMetaseq.obj : error LNK2001: unresolved external symbol "void (__stdcall* glGenBuffersARB)(int,unsigned int *)" (?glGenBuffersARB@@3P6GXHPAI@ZA)
1>GLMetaseq.obj : error LNK2001: unresolved external symbol "int g_isVBOSupported" (?g_isVBOSupported@@3HA)
源程序在这里
// OpenGLTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <gl\glut.h>
#include <gl\GLU.h>
#include <gl\GL.h>
#include "GLLight.h"
#include "GLMetaseq.h"
#define MOTION_NUM 59
#define MOTION_FPS 30
MQO_SEQUENCE seq;
int i=0;
void init(){
glClearColor(0.0,0.0,0.0,0.0);
glShadeModel(GL_FLAT);
//MQO
mqoInit();
printf("loading mode\n");
seq = mqoCreateSequence( "F:/personalStuff/Desktop/mqomod/mod_000%d.mqo",MOTION_NUM,0.2);
printf("loading completed!\n");
}
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
gluLookAt(0.0,0.0,0.0, 0.0,0.0,1.0, 0.0,1.0,0.0);
//glTranslatef(0,0,-10.0); //将物体移远,而不是将视觉移远
glTranslatef(0,0,3);
glColor3f(1.0,0.0,0.0); //x
glBegin(GL_LINES);
glVertex3f(10.0,0.0,0.0);
glVertex3f(0.0,0.0,0.0);
glEnd();
glColor3f(0.0,1.0,0.0);
glBegin(GL_LINES);
glVertex3f(0.0,10.0,0.0); // y
glVertex3f(0.0,0.0,0.0);
glEnd();
glColor3f(0.0,0.0,1.0);
glBegin(GL_LINES);
glVertex3f(0.0,0.0,10.0); // z
glVertex3f(0.0,0.0,0.0);
glEnd();
//glLoadIdentity(); //如果加了这句就都不显示!!是因为抵消了gluLookAt(0.0,0.0,5.0, 0.0,0.0,0.0, 0.0,1.0,0.0);这句!!!可以在这句后面加上gluLookAt(0.0,0.0,5.0, 0.0,0.0,0.0, 0.0,1.0,0.0);
/*
glRotatef(34.0,0.0,1.0,0.0); //先写的后执行
glRotatef(-39.0,1.0,0.0,0.0);
glRotatef(-23.0,0.0,0.0,1.0);
glRotatef(34.0,0.0,0.0,1.0);
glTranslatef(2.0,0.0,0.0); //这是位移后再旋转
glTranslatef(2.0,0.0,0.0); //这是旋转后再位移
glRotatef(34.0,0.0,0.0,1.0);
*/
glColor3f(1.0,1.0,1.0);
//glScalef(1.0,2.0,1.0);
//glutWireTeapot(1.0);
mqoCallSequence( seq,i );
glFlush();
}
void idle(){
i++;
}
void reshape(int w,int h){
glViewport(0,0,(GLsizei)w,(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0,1.0,-1.0,1.0,1.5,100000.0); //能够观察到范围的为距离观察点1000000.0到1.5 的区域内,设置这么大的数字是为了确保很远的地方东西也能看到
glMatrixMode(GL_MODELVIEW);
}
int _tmain(int argc, char * argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowPosition(100, 100);
glutInitWindowSize(640, 480);
glutCreateWindow("OpenGL");
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutIdleFunc(idle);
glutMainLoop();
return 0;
} |