|
|
各位网友好,谢谢你们的阅读.
我在自学OpenGL编程,编了第一程序,编译是可以通过的,但调试结果如下:
--------------------Configuration: show - Win32 Debug--------------------
Linking...
baiscobj.obj : error LNK2001: unresolved external symbol "public: void __thiscall CLoad3DS::Init(char *,int)" (?Init@CLoad3DS@@QAEXPADH@Z)
baiscobj.obj : error LNK2001: unresolved external symbol "public: void __thiscall CLoad3DS::show3ds(int,float,float,float,float)" (?show3ds@CLoad3DS@@QAEXHMMMM@Z)
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/show.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
show.exe - 5 error(s), 0 warning(s)
请各位网友看看是什么原因.我把部分代码拷过来:
___________________baiscobj .h____________________
#include "../include/3DS.H"
class baiscobj
{
public:
baiscobj();
virtual ~baiscobj();
public:
CLoad3DS* m_3ds;
void load3dobj(char* dir,char* cn,int a);
void Scene(int obj,float x,float h,float z,float r,int re,float size);//显示对象
};
_________________baiscobj .cpp___________________
#include "stdafx.h"
#include "baiscobj.h"
baiscobj::baiscobj()
{
char appdir[256];
GetCurrentDirectory(256,appdir);
}
baiscobj::~baiscobj()
{ }
void baiscobj::load3dobj(char* dir,char* cn,int a)
{ char appdir[256];
GetCurrentDirectory(256,appdir);
SetCurrentDirectory(dir);
m_3ds->Init(cn,a);
SetCurrentDirectory(appdir);
}
void baiscobj::Scene(int obj,float x,float h,float z,float r,int re,float size)
{ glPushMatrix();
int y=h;
glTranslatef(x,y,z);
glRotatef(re, 0.0, 1.0, 0.0);
if(obj>0) glRotatef(-20, 1.0, 0.0, 0.0);
m_3ds->show3ds(0,0,0.0f,r,size);
glPopMatrix();
}abc [em24] |
|