标题:[求助]一个连接错误,高手帮帮我啊!
只看楼主
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 
还是太大啦!你直接把CS3DModel的那两个文件给我.

=×&D o I p R e E n C g T l X&×=
2007-04-03 11:51
风月无边
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-6-20
得分:0 

.lib是二进制文件,没法看啊
.h文件定义的就是这定义的。
#ifndef __S3D_MODEL_H__

#define __S3D_MODEL_H__

using namespace std;

#include <vector>

namespace r3d{
class Shape3D;
}

namespace s3d {

class CS3DShape
{
protected:
LPDIRECT3DDEVICE9 m_pD3DDevice;

//geometry ------------------------------------------------
D3DXVECTOR3 m_Center;
float m_Radius;

int m_VtxSize;
DWORD m_VtxFormat;
int m_VtxCount;
int m_IdxCount;
int m_TriCount;

LPDIRECT3DVERTEXBUFFER9 m_pVB;
LPDIRECT3DINDEXBUFFER9 m_pIB;
//---------------------------------------------------------

bool m_bTexture;
char m_TextureName[256];
LPDIRECT3DTEXTURE9 m_pTexture;

bool m_bDiffuse;
DWORD m_Diffuse;

bool m_bMaterial;
D3DMATERIAL9 m_Material;
bool m_bTransparent;

public:
virtual ~CS3DShape();
CS3DShape(LPDIRECT3DDEVICE9 pD3DDevice, r3d::Shape3D* s);

//geometry ------------------------------------------------
D3DXVECTOR3 GetCenter(){return m_Center;}
float GetRadius(){return m_Radius;}

DWORD GetVertexFormat() {return m_VtxFormat;}
int GetVertexSize() {return m_VtxSize;}
LPDIRECT3DVERTEXBUFFER9 GetVertexBufferPt() {return m_pVB;}
LPDIRECT3DINDEXBUFFER9 GetIndexBufferPt() {return m_pIB;}

int GetVertexCount() {return m_VtxCount;}
int GetIndexCount() {return m_IdxCount;}
int GetTriangleCount() {return m_TriCount;}
//---------------------------------------------------------

bool HasTexture(){return m_bTexture;}
LPCSTR GetTextureName() {return m_TextureName;}
LPDIRECT3DTEXTURE9 GetTexturePt() {return m_pTexture;}

bool HasDiffuse(){return m_bDiffuse;}
DWORD GetDiffuseColor(){return m_Diffuse;}

bool HasMaterial(){return m_bMaterial;}
D3DMATERIAL9 GetMaterial(){return m_Material;}

bool IsTransparent(){return m_bTransparent;}
};

class CS3DModel
{
private:
bool ProcessModelScene();

protected:
LPDIRECT3DDEVICE9 m_pD3DDevice;
vector<CS3DShape*> m_ShapeList;

D3DXVECTOR3 m_Center;
float m_Radius;

public:
virtual ~CS3DModel();
CS3DModel(LPDIRECT3DDEVICE9 pD3DDevice, LPCWSTR FileName);

int GetShapeCount() {return m_ShapeList.size();}
CS3DShape* GetShape(int i) {return m_ShapeList[i];}

D3DXVECTOR3 GetCenter(){return m_Center;}
float GetRadius(){return m_Radius;}

};

} //end of namespace

using namespace s3d;

#endif // __S3D_MODEL__

2007-04-03 11:57
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 

加上一个没有参数的构造函数试一试.
class CS3DModel
{
private:
bool ProcessModelScene();

protected:
LPDIRECT3DDEVICE9 m_pD3DDevice;
vector<CS3DShape*> m_ShapeList;

D3DXVECTOR3 m_Center;
float m_Radius;

public:
virtual ~CS3DModel();
virtual CS3DModel() {}
CS3DModel(LPDIRECT3DDEVICE9 pD3DDevice, LPCWSTR FileName);

int GetShapeCount() {return m_ShapeList.size();}
CS3DShape* GetShape(int i) {return m_ShapeList[i];}

D3DXVECTOR3 GetCenter(){return m_Center;}
float GetRadius(){return m_Radius;}

};


=×&D o I p R e E n C g T l X&×=
2007-04-03 12:05
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 

构是否有包含它的.lib


=×&D o I p R e E n C g T l X&×=
2007-04-03 12:07
风月无边
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-6-20
得分:0 
错误 1 error C2633: 's3d::CS3DModel' : 'inline' is the only legal storage class for constructors d:\jh\ch07\7.1-sample-light-point light\s3d_model.h 90

所以我该成 inline后,还是提示原来的错误
2007-04-03 12:11
风月无边
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-6-20
得分:0 
包含了库文件 的
2007-04-03 12:12
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 
是否有包含它的.lib

=×&D o I p R e E n C g T l X&×=
2007-04-03 12:15
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 
用最好压缩.压缩得了一点发给我.

=×&D o I p R e E n C g T l X&×=
2007-04-03 12:16
风月无边
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-6-20
得分:0 

好的

2007-04-03 13:08
踏魔狼
Rank: 6Rank: 6
等 级:贵宾
威 望:24
帖 子:1322
专家分:33
注 册:2005-9-22
得分:0 

在vc6.0上测试,s3d_model.h/s3d_model.lib本身就有问题.
没解!


=×&D o I p R e E n C g T l X&×=
2007-04-03 13:26



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-128836-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.751936 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved