返回列表 回复 发帖
希望楼主尽快回复我,我最近在弄虚拟现实增强的东西,之前用opengl导入.obj或是3ds模型都出了点显示上不完美的问题,希望这次能用lz的方法解决,谢谢啦,在线等.....另外可以加我Q交流:958782314
77# peter_wwj
你没有正确加载那两个头文件,你可以将那两个头文件放到include文件夹中,然后再加入到工程中
77# peter_wwj 要是还不行,再问,我再回来!
顶,好帖子~ 学习中。。
simpleTest.obj : error LNK2019: 无法解析的外部符号 _mqoCreateModel,该符号在函数 _init 中被引用
4>simpleTest.obj : error LNK2019: 无法解析的外部符号 _mqoInit,该符号在函数 _init 中被引用
4>simpleTest.obj : error LNK2019: 无法解析的外部符号 _mqoCallModel,该符号在函数 _draw 中被引用
4>d:\ARToolKit\examples\simple\..\..\bin\simpleTestd.exe : fatal error LNK1120: 3 个无法解析的外部命令
请楼主不要回避这个问题
不好意思 问题解决了  头文件包含应该是#include "GLMetaseq.c",而不是#include <GL/GLMetaseq.h>,当然三个库文件都应放到vs相应目录下如C:\Program Files\Microsoft Visual Studio 9.0\VC\include
请问能给个找的网址吗,急需呀 15# 杯具的黑白日记
我进来膜拜LZ的
日记大神啊啊啊啊啊啊啊啊啊 后面怎么没了= =
不错,值得学习
人品好的楼主。。。
人生为棋,我愿为卒。
求教为什么会出现这样连接错误

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;
}
请问日记哥哥~~~  那个 头文件 <GL/GLMetaseq.h> 放在电脑的什么地方呢? 我放在 VC的include下面的 GL文件夹里咋不行呢? ~~~ 谢谢哥哥啦!! 1# 杯具的黑白日记
我也遇到这个问题~~~ 正在按照您所说的方法解决 嘿嘿 81# lj1900
亲 请问。。。这个怎么解决啊 我也不会啊= = 试了还是不行~~求帮助啊~~~~ 77# zhenartoolkit丫
返回列表