CD3DFont "Undeclared Identifier" problem ...
Thanks for reading my post. I am creating a font class for my game, and I need some help. I am using the files (D3DFont.h, D3DUtil.h, and DXUtil.h) in my project from the DirectX 8 SDK. When I try to compile, it gives me these errors:
RR_Font.obj : error LNK2001: unresolved external symbol "public: long __thiscall CD3DFont::InitDeviceObjects(struct IDirect3DDevice8 *)" (?InitDeviceObjects@CD3DFont@@QAEJPAUIDirect3DDevice8@@@Z)
RR_Font.obj : error LNK2001: unresolved external symbol "public: __thiscall CD3DFont::CD3DFont(char *,unsigned long,unsigned long)" (??0CD3DFont@@QAE@PADKK@Z)
If there is anything else I need to include please let me know. =)
Yes, I just tried that. Now I am having another problem. When I try to create the font, it says it''s an access violation. It shows, when I debug, that in the D3DFont.h header file, the device isn''t valid (it''s NULL), but when I take out the function for creating and drawing fonts, it works.
Well, then you are trying to create the font object before the device object is created. Suggest you create a test project from the DXWizard and look where it creates the font object.
~
~
This is really making me mad. I am trying everything and it still won''t work. I made a function for the font class called SetDevice() and I call it before RR_Font::CreateNewFont(), and when I debug it says, int the RR_Font::SetDevice() function, is this:
if (m_pDevice != NULL) // Valid d3d8 device object
m_pDevice = pDevice; // Copy object (DEBUG POINTS TO THIS LINE)
if (m_pDevice != NULL) // Valid d3d8 device object
m_pDevice = pDevice; // Copy object (DEBUG POINTS TO THIS LINE)
This is really making me mad. I am trying everything and it still won''t work. I made a function for the font class called SetDevice() and I call it before RR_Font::CreateNewFont(), and when I debug it says, int the RR_Font::SetDevice() function, is this:
if (pDevice != NULL) // Valid d3d8 device object
m_pDevice = pDevice; // Copy object (DEBUG POINTS TO THIS LINE)
if (pDevice != NULL) // Valid d3d8 device object
m_pDevice = pDevice; // Copy object (DEBUG POINTS TO THIS LINE)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement