Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

hawflakes

Another Link Error

This topic is 5284 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I know this is probably something really simple. I''ve dealt with this same error so many times and looked it up but I couldn''t figure how to fix it this time. I''ve been messing around with it for about an hour and I thought I would save myself some frustration. Here''s the code:
class XFile
{
public:
	XFile();
	~XFile();
	bool Init(IDirect3DDevice9 * device, char * name);
	bool Setup();
	bool Display(float X, float Y, float Z);
	HRESULT CalcBounds(float * radius, D3DXVECTOR3 * center);
	HRESULT ScaleMesh(float scale, D3DXVECTOR3 *offset);
	HRESULT NormalizeMesh(float scaleTo, bool bCenter);
	//inline d3d::BoundingSphere * GetBSphere(){return &BSphere;}


private:
	IDirect3DDevice9* pDevice;
	char * Name;
	D3DXMATRIX Location;
	ID3DXMesh * Mesh;
	ID3DXMesh * Sphere;
	HRESULT hr;
	d3d::BoundingSphere BSphere;
	ID3DXBuffer * AdjBuffer;
	ID3DXBuffer * MtrlBuffer;
	D3DXMATERIAL * mtrls;
	DWORD NumMtrls;
	std::vector       Mtrls;
	std::vector Textures;
};
 
and the error: test.obj : error LNK2001: unresolved external symbol "public: __thiscall d3d::BoundingSphere::BoundingSphere(void)" (??0BoundingSphere@d3d@@QAE@XZ) Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
You''ve declared a constructor for the d3d::BoundingSphere() but not actually implemented it.

Either delete the declaration of the constructor (and use the default constructor) or actually write the code which is supposed to go in the constructor.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!