[Help] SYMBOL/LIB REFERENCES
safgshfjhfgjfgj !
Trying to get this damn function to work. AFAIK these are only the d3dx9 lib needs to be included. Anyhow, I've got the following:
[PHP]#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "d3d9.lib")
// (more code)
class SpriteBatch
{
public:
static LPD3DXSPRITE sprite;
static void Initialise(LPDIRECT3DDEVICE9 device)
{
D3DXCreateSprite(device, &sprite);
}
static void Begin(DWORD myFlags)
{
sprite->Begin(myFlags);
}
static void Draw(LPDIRECT3DTEXTURE9 pTexture, const RECT *pSrcRect, const D3DXVECTOR3 *pCenter, const D3DXVECTOR3 *pPosition, D3DCOLOR color)
{
sprite->Draw(pTexture, pSrcRect, pCenter, pPosition, color);
}
static void End()
{
sprite->End();
}
static bool isReady()
{
if (sprite != NULL)
return true;
return false;
}
void dispose()
{
if(sprite != NULL)
sprite->Release();
}
};
[/PHP]
Yet, I get this error:
Please help me fix this problem. I've got absolutely NO idea why this is occuring - the correct libs have been imported, as indicated by the MSDN.
Thanks in advance.
Trying to get this damn function to work. AFAIK these are only the d3dx9 lib needs to be included. Anyhow, I've got the following:
[PHP]#pragma comment(lib, "d3dx9.lib")
#pragma comment(lib, "d3d9.lib")
// (more code)
class SpriteBatch
{
public:
static LPD3DXSPRITE sprite;
static void Initialise(LPDIRECT3DDEVICE9 device)
{
D3DXCreateSprite(device, &sprite);
}
static void Begin(DWORD myFlags)
{
sprite->Begin(myFlags);
}
static void Draw(LPDIRECT3DTEXTURE9 pTexture, const RECT *pSrcRect, const D3DXVECTOR3 *pCenter, const D3DXVECTOR3 *pPosition, D3DCOLOR color)
{
sprite->Draw(pTexture, pSrcRect, pCenter, pPosition, color);
}
static void End()
{
sprite->End();
}
static bool isReady()
{
if (sprite != NULL)
return true;
return false;
}
void dispose()
{
if(sprite != NULL)
sprite->Release();
}
};
[/PHP]
Yet, I get this error:
Code:
error LNK2001: unresolved external symbol "public: static struct ID3DXSprite * SpriteBatch::sprite" (?sprite@SpriteBatch@@2PAUID3DXSprite@@A)
Thanks in advance.


